The core of Java is Object-oriented (fully object-oriented)Object-Oriented ProgrammingYou have to be clear about the three main features of the object1. Behavior of the object2. The state of the object3. Object identificationIn addition, it is necessary to understand the relationship between objects more common relationships haveDependency Inheritance AggregationIn Java programs, programmers should minimize
() method.parsing:add elements to the ArrayList collection with a For loop, there is no error in the code, but the Java virtual machine gives the [], all B is correctparsing:set is an interface to the list at the same level, and there is no inheritance relationship between the two. parsing:The elements in the HashMap collection are unordered.parsing:HashMap is non-thread safe (unsynchronized), allows the key value to be null, and Hashtable is not all
class or interface-to-polymorphic;3. Dynamically create a subclass object based on the user's needs, and returnPackage cn.zzsxt.demo7.factory;//creating a parent class Public Abstract classAXE { Public Abstract voidcut ();} Package cn.zzsxt.demo7.factory;//Create Stone Axe class Public classStoneaxe extends AXE {@Override Public voidCut () {System. out. println ("I am a stone axe, cut Japanese blunt! "); }}package cn.zzsxt.demo7.factory.copy;//creating the Axe class Public classSteelaxe extends
:---------------Characteristics:The function name is the same as the class nameDo not define return value typesThere is no specific return value, and the object is definitely returned after creation.If the class does not have a constructor defined, the JVM allocates an empty construct.If the class defines a constructor, there is no empty construct.Role:Initializes the object.Attention:The characteristics of the default constructor.Multiple constructors exist in the form of overloading.Code block
Object : An instance that has features and functionality. Class : Is an abstraction of an object, a concept in people's mind, a collection of objects with common characteristics or the same behavior, and the use of classes to create objects;Create class: [Modifier] class class name { Create object: Class Name Object name = new class name ();Properties: Similar to variable naming, [modifier] Data Type property name analogy: Scanner input = new Scanner (system.in);Method: [modifier] Returns a valu
Student ();Stu.setnumber (4);Stu.getnumber;Stu.setname ("test");Stu.getname;This is the encapsulation of classes, what are the benefits of encapsulation?1. Good encapsulation can reduce coupling.2. The structure within the class can be freely modified.3. More precise control of member variables is possible:The member variables of a class can be read-only or write-only.such as accessor getxxxx (); modifier setxxxx (); With these, you can control read and write permissions4. Hide the information
Java implements simple console address book and java console address book
You can use the main menu to control sub-menus at all levels, add records, search for records, delete records, modify records, sort records, and exit the system. A total of six functional modules.
The figure above shows the functions of each mod
basically not read. It is very fortunate to read the study three o'clock, heard the Ober La Jonan teacher about Java OOP Language lectures, I understand the combination of books and other models of three design patterns, have a strong interest in other models and to conquer its desire! After work I bought the first is "Java and Mode", the first time spent 2 mont
Java programmer interview book-I ++, java book-IWhat are the output results of the following programs?
public class program2 { static { int x = 5; } static int x,y; public static void main(String[] args) { x--; myMethod(); System.out.println(x + y++ + x); } private static v
I have always believed that it is always best to learn about any new technology and the excellent books related to it. Of course, a good video tutorial can help you get to know the technology quickly, but to learn the technology in depth and in a systematic way, the best books are especially important. In combination with my own experience and lessons learned from Java, I make a list of some good books I've seen, which is my suggested reading order.1.
What is AOP in the Java programmer interview test book? A programmer interview test book
AOP (Aspect-Oriented Programming) is a supplement to object-oriented development, it allows developers to dynamically modify the model without changing the original model to meet new requirements. For example, you can dynamically add log, security, or exception handling funct
, speak Enterprise message Integration! Sun-Provided "PATTERNS SL500" is also very good! Late recommended that a Amzon 4 stars and a half of the "Holub on Patterns", masterWorks, provided, well worth studying examples, but to the above four is not very familiar with the reader, it is best not to read it! May make you more tired!I study design patterns after a very tortuous route, and then read about 20, Dr. Shanhong's "Java and Mode" I read 4 times, b
operation?I hope I can find the answer in this book.That's the spring book?Where did I read for 2 hours?Color (449211678)?? 9:38:08Put? The IOC, the festival? MVC component? read it all over again.I'm sorry, but I don't have enough touch java.Gentle Knife (394253152)?? 9:38:21Color classmate time to tidy up the mini bar ~ ~Color (449211678)?? 9:38:28Yes, wow.Gentle Knife (394253152)?? 9:38:40Tian Lin (414004)?? 9:38:40Spring Technology Insider-in-dep
Java old A This book for a long time, yesterday finally began to china-pub on the pre-sale, other sites may be slower, but since the call presale, it must have not arrived.Interested people can go to see Kazakhstan (subsequent other website addresses will also be published here):Http://search.china-pub.com/s/?key1=java%cc%d8%d6%d6%b1%f8type=pz=1For the contents o
Sophomore semester, just after teaching C + + began to question what they have learned.We spent more than a year, learned C, learned C + +, learned the data structure but why I can do is only limited to brush OJ it? (Of course, OJ Brush is not much) is not as good as reading medium students can at least use flash to make a game out. Then accidentally saw the roommate's book, and had always heard that Java o
administrator.Add: Refer to Administrator's registration function.Delete: According to the administrator's ID to delete, the deletion needs to determine whether the ID number exists, the presence of delete and prompt the user to delete the results, otherwise prompt the user ID The number does not exist and is re-entered. Modification: First, according to the user ID number to query the user information, and then modify, modify the same need to judge the input information, the success of the mo
Monthly salary: 30 K java programmer 2018 java learning advanced Book recommendation, 2018
What books does java have to read? The first example of this article is "Java development practices and classics", because I think that beginners who have not been in touch with
Buy Classic Java IDE myeclipse send Java Classic best-selling book: Basic version of the book Yas Block masterpiece "Effective Java Chinese version (2nd edition)", buy advanced version of the programmer must book "
+ + relies on some non-standard libraries provided by other vendors.Common written Questions:The following statements are wrong ()A:java Object-oriented language allows individual processes and functions to existB:java Object-oriented language allows separate methods to existMethods in the C:java language belong to members in the Class (member)A method in a D:java language must be subordinate to a class (object), and the calling method is the same as a procedure or functionAnswer: A, B, C. See
As a Java programmer, the most painful thing is to choose a range too wide, can read too many books, often easily confused. I'd like to pick out some of the technical books I've read and recommend them to you in the order of study, especially to the Java programmers who want to keep improving their skills.
First, Java programming into categoriesfor programmers w
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.