2018-03-11 20165235 Qi Ying "Java programming" the first week of study summary

Source: Internet
Author: User
Tags array length

2018-03-11 20165235 Qi Ying "java program design" the first week of learning summary textbook Learning content Summary
    1. Chapter II Highlights:
    • In this chapter I have learned a lot of things:
    • (1) Boolean type bool, the assignment of a Boolean type can only be true or false.
    • (2) Unicode code
    • (3) System.out.println () input + indicates end-to-end connection
    • (4) Float:8 digit valid number, Double:8 bit valid digit.
    • (5) A declaration type is required from low precision to high precision conversion.
    • (6) The Scanner object call method takes the data input from the user's keyboard to wait.
    • (7) Declaring an array: type [] array name. Array initialization int [] array name = NULL. Create array: Array name = new Type [array size]. Array length (number of elements) calculation: array name. length.
    • (8) The array that references the always has a consistent unit. a = b(the value in a is not, occupied by B). Arrays use subscripts to access their own cells.
    1. Chapter Three highlights:
    • (1) The instance operator determines the class of the variable attribution.
    • (2) The switch statement and the Loop statement are basically the same as the C language. Where the For loop can write for(声明循环变量:数组的名字){} . Where the loop variable must be declared within ().

      Problems in teaching materials learning and the solving process
    1. Question one: How do I enter numbers from the keyboard to an array?
    • Resolution process: I search, search the code, the above is used scanner to input data from the keyboard to the array, where the code is as follows:

      import java.util.*;public class a{public static void main(String args[]){int[] a = new int[10];Scanner reader = new Scanner(System.in);for(int i=0;i<10;i++){  a[i]=reader.nextInt();}
    1. Question two: How to generate random numbers?
    • resolution procedure: Online query, in Java.util This package provides a random class, we can create a random object to generate a stochastic number, he can produce random integers, random float, random double, random long, This is also a method that we often use to take random numbers in the J2ME program.
    •   random random = new random (); Random.nextint (x);  
      Code debugging problems and resolution process this time when debugging code will appear when the compilation error, but can be corrected in a timely manner. Some problems were encountered while uploading the code. such as:

      can not open the SRC folder, I surf the internet, Blue ink Cloud class query and so on are not resolved. I was in the directory to create a temporary folder, the SRC files are copied to the temporary folder, and then pushed to the code cloud with git tools. Found temporary files on the code cloud can be opened. Return Unbutun the src folder to delete, the temporary folder name to SRC, has been pushed again, found in the code cloud can open the src file directory. For example:
    • also runs the script
    • Code hosting

      last week exam error summary

      This exam three questions, because network problems I have not been able to submit, to the examination topic to revise and summarize. I put the wrong question summary in the 20165235 Qi Ying Java Second week exam summary The teacher can click the link to open the view.

      More content
    • Learning: During this learning process, it was found that a large part of the Java syntax structure is similar to the C language, such as loop statements, conditional branching statements, and switch switches. In contrast to the C language, there is a Boolean type, and only Boolean types of data can be used in conditional statements. And in the course of learning to find the code on the book is a good way to learn, you can learn the Java language writing format, grammar, and various types of call methods, so that we subtly formed a good habit. While knocking on the book Code, we should also try to write some code, to learn Java to continue to practice. Hope in the future on the way of learning teachers can give me some tips and help, thank you!

      Learning Progress
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 31/200 1/2 12/20 Git uses
Second week 404/500 3/4 24/38 Java Basic syntax

2018-03-11 20165235 Qi Ying "Java programming" the first week of study summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.