[Original] "Gao Qi poetry three hundred, Yue Xue Yu wow" series of notes (long-term updates), Gao Qi Poetry

Source: Internet
Author: User
Tags float double float range

[Original] "Gao Qi poetry three hundred, Yue Xue Yu wow" series of notes (long-term updates), Gao Qi Poetry

[Copyright statement] Reprint-non-commercial-non-derivative-keep signature (CC BY-NC-ND 3.0)

[Posting date] December 22, 2015 @ happy little master fairy

 

Eclipse uses workspace management working set management project management package management class

Remember: Expressions (operations, or even a number) return values!

 

Gao Qi JAVA three hundred 

1. Learning Methods: go deep into the memory structure, analyze the JDK source code, learn JAVA: enterprise-level server development + Android development, and learn programming languages: Find a language and be proficient in it.

2. The first generation of machine language-the second generation of assembly language-the third generation of advanced language (process-oriented, object-oriented)-the fourth generation of SQL (suspect): The trend toward easier use.

3. Product Standards: compared with the previous generation, products are easier to use and more powerful.

4. Machine 0101-assembly abbr.-The performance of the hardware from the electronic tube to the transistor is improved, and the computer can start to do more, so more software is needed and compilation is not enough.

5. process-oriented C_FORTRAN_COBOL_PASCAL_ADA; Object-oriented C ++ _ JAVA_C #

6. JAVA core advantages: cross-platform. JVM (Sun provides different virtual machines for different systems and Sun solves system differences without worrying about them)

  

8. JAVA versions and architecture:

   

9. JDK (oracle.com/downloads)

  

 

10. The identifier starts with a letter, underscore, or dollar sign (or even a Chinese character ).

11. One character in Unicode occupies two bytes: 1B = 8bit, 2 ^ 8 = 256, 2B = 16bit, 2 ^ 16 = 65536, and about 20 thousand Chinese characters.

12. character set (ISO8859-1-BIG5 + GB2312 GBK GB18030 + Unicode ).

  

13. JAVA data type: four types of eight basic types + object reference.

  

14. byte short int long _ 1 2 4 8 byte _-128 ~ 127 + + 30 thousand + + 2.1 billion country chess board; BigInteger class.

15. hexadecimal conversion: Integer.? String (),? = Binary Octal Hex.

16. The default value of an integer constant (literal) is int;Integer constants can be automatically convertedByte short char.

17. float double _ 4 8 bytes. The default value of a floating point constant (literal) is double.

18. The float range is larger than that of int, And the float range is limited to an infinite number of decimal places. It cannot accurately represent all decimal places with rounding errors. The BigDecimal class is used for precision, so as to avoid comparing floating point numbers.

19. char occupies 2 bytes. escape characters (single-cited, double-cited, backslash, tabulation, and line feed) are operated as integers.

20. Automatic type conversion:

  

21. Automatic type conversion: int/long can be converted to float but may lose precision. long can be converted to double but may lose precision. int to double won't.

22. If the forced conversion exceeds the range of the number of tables of the target type, it will be truncated into a completely different value.

23. Note that during calculation of binary operators, automatic type conversion may cause type improvement.

24. Automatic type conversion (The capacity is the number range of tables rather than the number of bytes.), Long is 2 ^ 63, float is 3.4e38 (double is 1.7e308 ).

25. New Features of JDK7: the binary integer 0 B (used for more convenient operation of memory and shift operations, frequently used for writing games and permission management ).

26. New Features of JDK 7: underline separator (write long numbers in segments and read them out when four digits are separated ).

27. Local variables must be declared and initialized before use.

28. final constants (final variables) can only be initialized once. Use [all uppercase + underline] to name them (Ruby conventions are higher than configuration-lower case means that variables are capitalized as constants ).

29. identifier: separated by the name and description-variable name, method name, and camper; Class Name, and camper.

30. OPERATOR:

  

31. Upgrade the binary operator type to the sequence of the unary operator:

  

32. Logical short circuit: if the first logical & value is false, the second logical or the first logical is true, and the second logical is not. If the first logical is false, the second logical is not short-circuited or non-short-circuited.

33. logic and or can only operate on Boolean variables. bitwise AND or (bitwise operator) can also operate on integers. bitwise AND &-if there is 0, zero, and zero, then 1; returns 0 if it is bitwise OR ^-the same; returns the inverse ~.

34. Note: The int value is four bytes. The default value is binary 32 bits. The reverse value changes the symbol bit.

35. Shifts one digit to the left (1) equals to multiply by 2, and shifts one digit to the right (1) equals to divide by 2. the operand followed by the shift operator is the number of digits to move.

36. Questions: multiply by 2, 4, 8... How is it the fastest? Shift.

37. Priority: use parentheses in the expression after multiplication and subtraction.

38. essence of programming: implement business logic with code as soon as possible! In fact, learning javase to use notepad or eclipse does not have much to do with this problem.

39. eclipse: Window-Show view-Outline view is used to view the class structure.It mainly depends on methods, especially heavy loads.

40. eclipse: breakpoint: the place where the program stops when running in debug mode (double-click and remove breakpoint, right-click debug ).

41. eclipse: four buttons in the debug view: run to the next breakpoint or press F8 to stop CTRL + F2 to enter the next line of F5 (F2 = Focus Ctrl + 1 = QuickFix ).

42. eclipse: F11 = debug, Ctrl + F11 = run; change run to F10 (in fact, do not change it. If no breakpoint is set, debug is run) and Hide Toolbar.

43. Control statement: (sequential structure), [Single-double-multiple] Select structure (if good habit-even if one row is curly-otherwise the control scope is only the first statement), and loop structure.

44. switch statements are used for equivalent judgment. Note that the loss of break causes case penetration: Ignore the case value and then execute the code in the case until the break is hit.

45. Multiple rows use case to write only values and ignore bodies, and indirectly use case to penetrate multiple equal values.

46. New Features of JDK 7: switch expression results can be strings (+ int and enumeration ).

47. while loop: if the condition is met, it will be executed again (first judgment and then execution, while do {} while (); first execution and then judgment ).

48. eclipse: Modify the variable name. To prevent omission, right-click-Refactor-Rename.

  

49. problem-solving skills: [Delete question stem] simplify the decomposition of difficulties and implement them one by one

50. problem-solving skills: for Loop printing 9-9 multiplication tables? First, we must maintain a positive attitude, "you will certainly !", First, if you don't learn the loop, will you?The first reaction is that I can do it and then think about how to do it.

51. goto shadow: break and continue with tags (JAVA retains the goto keyword but has no function ).

52. Method: The parameter is used to receive data from external input when the method is called. The parameter argument is used to actually transmit data to the method when the method is called. Essentially different: a parameter is essentially a name that does not occupy memory space. The essence of a real parameter is a variable that occupies memory space.

  

53. Method: in JAVA, only the value passing-the data value passing of the basic data type itself is passed, and the reference type is passed to the object instead of the object itself.

54. Principle of the design method: The method is intended to be a functional block, which is a set of statement blocks that implement a function. When designing a method, we 'd better maintain the atomicity of the method, that is, a method can only complete one function, which is conducive to our later extension.

55. recursion = recursive header (when do you do not call yourself) + recursive body (when do you call yourself ).

  

56. Recursive illustration and memory: recursive two stages-recurrence and regression.

: Http://www.cnblogs.com/whl2012/p/3608973.html

57. recursion: programming skills of the program calling itself (example: factorial calculation and Fibonacci series ).

: Http://www.2cto.com/kf/201301/181639.html

58. api: Package (all packages)-class (all classes and interfaces under the package)-details (detailed descriptions of classes and interfaces); click Overview to list all packages, the second-level Link provides "package overview ".

59. package? Similar to "Folders", it solves the problem of duplicate names between classes and facilitates management (suitable classes are located in the appropriate package ).

60. Package name: the domain name is written backwards, coupled with the module name, and in the internal management class.

61. eclipse: use ctrl + n to create a project (pay attention to working_set), package, and class.

  

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.