Learning content summary
Chapter two
Switch, splicing and escape sequences (1) of the string;
(2) the definition of variables and constants, and the variables are assigned;
(3) basic data types (integer, floating point, character and Boolean), this section in understanding
complex on, some basic concepts and definitions, the need to control the actual operation;
(4) expression is usually complete the calculation;
(5) an interactive program to achieve the object-oriented platform, this is my biggest harvest happiest part of this chapter in
third chapter
1. Object: creating an object, object reference variables, aliases, and the object class.
2. several classes: String class, Random class, Math class, NumberFormat class and DecimalFormat class.
3. Package and class libraries: package and API
4. enumerated type
5. Packaging Type
Textbook learning and problem-solving process
Question 1: For the connector, if connector is digital, you can not quote can be converted to a string, but if you add the quotation marks, or words in the sentence will be.
Problem 1 Solution: need to actually knock out experiment, the result is a number plus without quotation marks does not matter, but the word in the sentence will not work unless a declaration of variables. After this process, I also found a problem, if after I finished "+" I want to change the line, need to use "\ n", if I do not add quotes useless, I only put it in quotes into a string in order to achieve their goals.
Question 2: When do PP2.4 this problem, I encountered two cases of input values together, forget the screenshots, the difference is about the next () and nextline () of.
Question 2 solution: search on Baidu from the problem, the result is what I found next () among all the characters before the Enter method returns, he can get a string with spaces; and next () will automatically erased before a valid character spaces, returns only character input, and can not get the string with spaces.
Code debugging and problem solving in the process
Question 1: After doing the previous exercise, I want to get a result there is a decimal point, but did not know how to modify
Problem 1 Solution: After reading the book, is still not clear, and the corresponding Internet search method, explanation is that he has to get the fractional part omitted, output floating point, I need to change internal procedures to integer float points.
Question 2: Problems encountered last, to write a blog not been able to solve, run code hosting script error, not the number of rows in my code.
Problem 2 Solution: Temporarily not been able to solve.
Question 3: The difference between print and println is not particularly clear.
Question 3 Solution: practice
Question 4: This is a special find, do not know how the file names with spaces open, such as "week 2"
Question 4 Solution: Various attempts! This is by far the best way I know of use.
Last week exam wrong question summary
Java byte codes are directly executable whereas Java source code is not. (Java bytecodes can be executed directly, and the Java source code is not.)
A true
B false
Understand: in fact they are not directly executed
Java byte codes are directly executable whereas Java source code is not. (Java bytecodes can be executed directly, and the Java source code is not.)
A true
B false
Understand: in fact they are not directly executed
"Println" as "printn" will result in (the "println" Print to "printn" will result)
A a syntax error (syntax error)
B a run-time error (runtime error)
C a logical error (logical error)
D no error at all (no error)
E converting the statement into a comment (comment this statement into)
Understand: simply do not remember the meaning of English.
When executing a program, the processor reads each program instruction from (when executing a program, each program instruction processor reads from ___)
C .registers stored in the processor (stored in a processor register)
D .main memory (main memory)
Appreciated: a processor directly from the main memory (RAM), read program instructions. A register for temporarily storing commands, data and addresses, because the capacity is too small, it is impossible to lay down many program instructions.
Which of the following characters does not need to have an associated "closing" character in a Java program? (In a Java program, which of the following characters do not need to have the "end" of characters associated with it?)
A .{
B .(
C .[
D .<
E .all of these require closing characters (more characters are required at the end)
Pair peer review and
Blog worth learning:
Learning content and clear;
Timely correct reflection on their own problems and the wrong question;
Based on score, I give this blog scoring: 15 points. Scores are as follows:
Proper use Markdown syntax (1 point):
Elements range (1 point) template
Textbook learning and problem solving process, a problem plus 1 point (3)
Code debugging problems and solutions in the process, a problem plus 1 point (3)
Week over 300 branches valid code (plus 2 points)
Other plus points:
Feelings, experience does not leave large empty 1 point
Typesetting fine plus one point
Progress bar records the learning time and improve the situation of 1 point
There are hands-on writing new code, add 1 point
After class choice has verified 1 point
Learning the wrong questions in depth, add 1 point
Comments seriously, I can point out problems and blog code plus 1 point
Pair learning authentic plus 1 point
Comments had students blog and code
Pair this week learning
20,182,311
Other (perception, thinking, etc., optional)
Sometimes very sleepy in class, the class of the state is not good, so the next class needs to spend more time to learn, but I ask the students will learn.
## learning progress bar
The number of lines of code (add / accumulate) | Blog amount (add / accumulate) | Learning time (add / accumulate) | Important growth | |
---|---|---|---|---|
aims | 5000 rows | 30 | 400 hours | |
the first week | 200/200 | 2/2 | 20/20 | |
the second week | 300/500 | 2/4 | 18/38 | |
The third week | 500/1000 | 3/7 | 22/60 |
Reference material
"Java Programming and Data Structure Tutorial (second edition),"
"Java programming and data structures Course (Second Edition)" Study Guide