Master Java Core Technology Learning notes
Mastering Java Core Technology is the key to learning and mastering Java technology, the bottom 17 points to these Java core technology to explain.
No more inheritance in 1.Java, instead of multiple inheritance with interfaces
2. When running a compiled program, the Java interpreter always executes from the code in the main method of the specified class, so there must be a main function in the execution code.
3.Java is a typical strongly typed language, that is, you must declare the type of the variable, there are 8 types in Java, 6 numeric types (4 integers and 2 floating-point), a character type, and a Boolean type.
4. Force type conversions:
int NX = (int) x; (Syntax: Enclose the target type in parentheses, followed by the variable to be converted);
5.Java You cannot define a local constant for a separate method, such as the main method, but you can define a constant for the class, which is used by all methods of the class, so it is commonly referred to as a class constant. Such as:
- Class usersconstants{
- Public static final Double g = 32;
- Public static final double main (string[] args) {
- System.out.println (g);
- }
- }
Note: Constants are defined outside the main method and must have a keyword static final;
6. Substring of string:
- String str = Hello"";
- String str1 = str.substring (0,4); //Output Hell
7. Do not use the = = operator to test whether two strings are equal, the operator can only determine whether two strings exist in the same position.
With equals.
- String str = "Hello";
- Str.equals ("hell"); //return false;
8. Behavior, status, identity of the object
9. Process-oriented and OOP
10. Constructors:
The object used to initialize the class must be the same as the name of the class, the constructor can have one or more parameters, always call the constructor with the new keyword, and a class can have more than one constructor (the parameters are different).
11. Static Method:
Static methods are classes, and static methods can be called without creating an instance object of the class. such as Console class:
x = Console.readdouble ();
The general syntax for using static methods of a class is: Class name. static method (parameter);
12. Overloading (polymorphism):
If there are several identical methods under a class, but the parameters are different, then the overloads of the methods are formed.
Java can overload any method, not just a constructor.
13. Type Conversions for objects:
Manager boss = (manager) args[0];
The difference between a 14.Java array and a Java vector:
Java arrays can store any type of variable, and Java vectors can only store instances of an object class.
- vector () //constructs an empty vector, The initial capacity is 10, and the capacity doubles when the current capacity is exceeded.
- Vector ( int initialcapicity)
- vector ( Span style= "color: #006699;" >int initialcapicity, int n) //when the current vector is exceeded, The current number of vectors +n extended.
- void addelement (object obj) // Appends a new element to the tail of the vector
- int size ()
15. A class with one or more abstract methods, which must be declared as an abstract class (keyword abstract)
- //public abstract class HelloWorld () {
- Public abstract void test (); //Abstract method: is an incomplete method, with only a declaration and no method body
- }
Abstract methods require that all non-abstract classes derived from an abstract class implement the abstract method. Abstract methods are implemented as placeholder methods in subclasses.
16. Abstract classes cannot be instantiated (because abstract classes may contain incomplete abstract methods)
17.JDBC of internal principles and ideas:
1) JDBC actually has two layers, the upper layer is the JDBC API, which communicates with the database driver and sends SQL statements to it. The database driver connects the SQL statement to the relational database.
2) JDBC vs. database connection model:
Java Training Tips
Time:2015-01-20 11:12
Source:Good word good sentence net
Author:Book Pass 001
Java Training tips: Java Training experience
Participate in the extension of the Java training course for some time, today occasionally a bit of time, to share the next time in the extension of learning Java training heart experience. Learning Java programming is very boring and boring, every day is on the computer to write code, a line of code in the computer keyboard hit like a castle in general, must be very careful, because a little attention to a punctuation mark, or a little bit of small error, it may be hard to write a few days of the code is wasted, Have to come back again. So write code to have a rigorous attitude, to repeat the test, check. Otherwise the hard-earned high-rise will be due to their negligence a small mistake, collapsed. And in my opinion the boring code is like a life-beating note, as long as you carefully completed, will always play a fascinating movement.
Since participating in the extension of the Java training course, I feel that the most profound is the time is not enough, every day is very substantial. Busy to have no time to date, busy to no time for leisure and entertainment, busy to eat and sleep still writing code, even eating and sleeping classmates are talking about how to write code to achieve some kind of function. In the Dong Xuyuan listening to the teacher Java programming courses let me benefit, Dong Xuyuan teacher humorous, and gradually, gradual teaching way let us grasp the code faster, and he also let us participate in software development projects, theory combined with practice, let us in the work to find problems in the practice of growth. This immersion Java training teaching I feel very good, practical knowledge, only in practice can really learn things, find problems, can better improve themselves.
In this period of study life, I also know a lot of classmates, we come from different schools, we are together because of the common ideals, during which we have been confused and wandering, there are hardships and laughter, but anyway, we smile face, because we are an ideal yard farming. Although we are on the road, perhaps some rough, but in fact, the joy of life is in the ups and downs, as long as we firmly believe that the direction of our progress is correct, I am convinced that one day will always touch the heaven.
The road long its repair far XI, I will go up and down and quest. Share!
Java Training Experience II: Java Training experience (910 words)
Learning Java must be done in three steps:
1. Carefully preview before class.
2. Listen carefully in class.
3. Review carefully under class.
I think it is only by doing these three steps that I can keep pace with my teacher.
Java is fun to learn and can improve your logic thinking by learning Java. During the study of Java we made a number of programs, our classmates are also actively prepared, the completion of a good! In the process, I encountered a number of problems, and sometimes error, patient debugging to solve the problem, I know that only adhere to the success.
Because Java is an object-oriented programming language, people who have just come into contact with Java may feel more abstract, but do not worry, listen to the teacher in class to explain, some of the concept of knowledge slowly to understand, after class to do exercises, practice makes perfect, even if your memory is good, after class do not go to strengthen practice is useless, Only practice more, when you are doing the project, you can skillfully write the code you want. Weekdays in the practice if you encounter the problem can not solve the project, first of all, do not rush to ask the teacher, or anxious to search the answer Baidu, so even if you get the correct answer, later in other places encounter the same problem, you still do not know how to solve!
I think the key to Java learning is to keep practicing. Learning Java every day must be guaranteed a certain amount of practice, our teacher also said that learning programming language there is no shortcut to go. Really, only repeated daily operation, often write code, we have a problem when there is a certain way of thinking. Waste, learning programming language needs a relatively long period of time, can not skyrocketing rise, which requires a process, in the process of slowly accumulating experience, solid foundation. Do not think that you have written a simple small program, you think you have learned very well, this is just a little practice in your learning programming process. Do not be satisfied with the status quo, to constantly improve their knowledge system, good at summing up practical experience. To correct their learning attitude, is the initiative to learn, rather than passive! Improve self-study ability. The secret of learning programming is: programming, programming, reprogramming. Not only to practice more, but also to practice quickly. Many other software needs to be downloaded to the English website, you need to be able to find them, these are the most basic requirements. Good English is a great help to your study.
Learning Java this time, sometimes feel a bit bitter, but I think it is with your struggle when the bitter, can be changed after the sweet. You have a sense of accomplishment when you finish a project by writing code carefully. There is a feeling of joy in my heart.
Learning Java depends on the tenacity, depends on the vigor, rely on perseverance. If you do this, I think Java is not too difficult for you. Also, you have to have confidence, believe that you can learn.
Java Training Experience Three: Java Training experience (776 words)
In a blink of an eye, a few months of training has come to an end. Looking back on the experiences of the past few months, I have gained quite a lot and feel that I have come to this training is very correct. Think of the time I have just thought about the training when that disturbed mood, now I have the answer: "I am very glad that I chose this path."
Here, I reap the fruits of fruitful knowledge. My training direction is to focus on the Java direction, later also learned the current more popular Android technology. During the training period, we mainly learn and take care of the knowledge by actually working on specific projects. This is exactly the exercise we need. In school, although we have learned a lot of professional knowledge, but we do not have their own areas of expertise, and we are learning the theoretical knowledge, practical ability is very poor. So, we need to develop our own hands-on ability. At the same time, our teachers have been working on practical projects, have a certain degree of work experience, they not only give us expertise, but also to teach us the skills of the workplace. Training provides us with a platform to nurture what we need to get into the workplace.
Here, the teachers of the crazy software gave me a detailed and reasonable curriculum, during the study, I learned a lot of knowledge before, perfect and supplemented my existing knowledge, so that I from the original Java development ignorant, lost to have their own knowledge system, can be skilled and confident development of internet projects. Crazy software Java Training has a good learning atmosphere, I here slowly down, for their future better development laid a solid foundation.
In this four months of study, everyone has a computer, can be at any time on the machine practice, verify and practice their ideas and knowledge, and then a knowledgeable teacher selfless answer questions, so that the daily life is very substantial, knowledge on the level also has a qualitative leap, although very tired but also very happy. I learned that Java employment wages are very good, so I have to strive to achieve their own goals.
In short, through this training, I found their own goals, to find their own career path. After graduation, I entered the post of the Yue Chuan Network Technology Co., Ltd., the position is a Java engineer. In the future, I will start from a hard-working code, after two or three years of struggle, accumulated a certain business knowledge, and then slowly climb up.
Java Training Experience Four: Java Training experience (2170 words)
When students learn Java in school, the teacher too much content, students with the teacher learning, often can not grasp the focus of learning, learning too vague, but also lack of project experience, resulting in some students will only vague theory, project capacity, practical ability is not strong, up to the enterprise selection of talent standards. But after students take part in the training of soft, the students can have a better understanding of the structure of Java, and the knowledge point can be deeply coherent. In particular, the interview at the test center can do a very good grasp, so that you in the enterprise interview process, whether it is the project ability, or the ability of the exam, will let you have a great upgrade, so that you in the process of seeking a win-win.
Students in the initial study of Java, students consider that they have a C language Foundation, and the English Foundation is also very solid, so want to first school and then go to the exam. School after a period of time, found that the knowledge of Java is relatively easy to understand, so confident to do a few sets of test simulation, but the results of the students have been quite hit. The reason, the students found that they usually learn computer language habits more on the machine practice, more documents, more than a reference book, so to some of the details of the place often do not add special memories. However, in exams, there are no documents to look at, and the content tends to be biased toward the details that are not noticed. And because Sun Company used for examination of the special course, only after the Authorized Training center to participate in the training can be obtained, so the focus of school learning often with the direction of the exam "great difference". So after taking part in the soft training course, it will make it easier for you to pass the exam, get SCJP certificate, and get you a high salary.
The instructor will give reminders and explanations to the points of knowledge that are not easily noticed during school learning.
For example, the garbage collection mechanism, Java does not have pointers, the use of background threads for garbage collection. School when learning to see the explanation of the book is really confused, after the lecture, it will "suddenly dawned." The instructor has listed a few things that the knowledge point must understand: "The programmer has no right to reclaim memory; The system automatically completes garbage collection; The time of recovery cannot be predicted; The programmer can assign a local variable to NULL, make it meaningless for recycling, and cannot reclaim memory when running the user thread , garbage collection must have the variable assigned to NULL. "The instructor will list the participants in the examination of such knowledge points
Because the direction of training is application-oriented and certification exams, promote employment. So throughout the course, the focus will be on the test center, where the instructor will add some practical knowledge to help understand. For the concept of difficult to distinguish, the instructor will use examples to summarize, students can be efficient and accurate grasp.
For example, "heavy load (overloading)" and "cover (overriding)" The two concepts, the exam often test, their own reading feel very similar, the book is very abstract. In a Chinese reference book, "overloading" is interpreted as "implementing a member function of the same name in the same class with different elements", explaining "overwrite" as "a method in the subclass to modify the parent class", and the example is very simple, even if the meaning of it is understood, it is difficult to think how to test this knowledge point in the exam. In the soft Java training course, the lecturer summed up the differences and points of the two concepts into a few, summed up the characteristics of the overload as "method name in the same class method, number of parameters, parameter type, parameter order cannot be exactly the same; only methods with different return types are not overloaded; Constructors can also be overloaded." At the same time, the features of the overlay are summed up as "methods with the same name in the subclass and parent class respectively; The method declaration form must be the same; the Subclass method access permission cannot be reduced; A method overridden in a subclass cannot throw more exceptions than a parent class. "For each of these two concepts, each feature and difference will have an example to explain it, and will give the students time to think about consolidation." Examples are very relevant to the knowledge point, can grasp these two concepts firmly in the shortest time. Then the instructor will cite an example in the exam to practice, so that students not only grasp the knowledge point, and understand thoroughly, is so-called "original aim", the exam as long as the two concepts related to the problem will be solved.
The instructor will give reminders and explanations to the points of knowledge that are not easily noticed during school learning.
For example, the keyword false and true cannot be capitalized, which is difficult to pay attention to when studying in school. When the instructor talks about the keyword, it writes "FALSE", asks if the learner is a keyword, and each person responds differently. The instructor will emphasize that soft Java is strictly case-sensitive, and false and true cannot be capitalized. Then there will be appropriate test examples, such as: Which of the following are the keywords? A.falseb.truec.gotod.sizeof. Because the thought soft Java cancels the goto statement, so Goto is certainly not the key word, has the C language Foundation person to the sizeof to want to be familiar, therefore very easy to think that sizeof is also the soft Java keyword, but the result is opposite. Goto is a keyword, but just a reservation is not used, and sizeof is not a keyword. So memory is more profound, school learning often easy to ignore.
Throughout the course, students can share the instructor's electronic version of the handout, the need to take notes very little content, students can concentrate on lectures, without distracting attention for notes. The lecturer's handout is very organized, and the lecture content is very appropriate, so in the review and preview is very convenient. The training materials are also issued by Sun Company specifically for certification training, content fastening certification exam, than the domestic translation of Chinese books more conducive to learning and examination, and this textbook is not available on the market. Each class has sufficient time to experiment, at the same time there will be instructors to provide guidance, so that the content of this lesson will be quickly mastered and understood, encountered problems will be the instructor in a timely and patient explanation.
There are many differences between certification exams and programming, and the instructors at the training center not only teach for exams, but also design some programming skills. Some training centres are also authorized test centers (e.g., the Centre for Soft Training), and the test center staff will teach the trainees free of charge before the exam. This is necessary, because the first time to participate in the certification examination of a lot of students, if you do not know how to answer the question and some attention to the details, it is likely to cause errors due to the operation of the exam can not be carried out.
We Shanxi think soft training institutions will be responsible for each student, responsible for themselves. Believe in yourself, also believe that the soft, I believe with us and you work together to learn, follow the soft teacher study, earnestly complete the training and learning tasks, high-paying employment is no longer a dream, but is about to become a reality.
Java Training Experience Five: Java Training experience (447 words)
In a blink of an eye to Dahne Nanjing Java Training has been nearly 4 months. In this short time, I learned a lot of knowledge on the other hand, but also made a lot of new friends. Although the learning process is very tired, but the process of learning is so substantial, in the study of Java, Learning Java has some deep experience:
1, Learning Java mentality: Java is a computer language, is the language of human invention, should be more easy to learn than human language, as long as you have a win to learn Java mentality can be successful.
2, Learning Java guidance Teacher: Learn Java instructor must have project development experience, if no development experience Java Learning Teacher guidance, will spend a lot of time; Dahne teachers are rich in Java teaching
Experience, this also makes my study a lot easier.
3. Learn Java project: Java Enterprise Business Project is very important, must follow the Java Enterprise Business Project to learn and guidance.
4, the method of learning Java: Java Learning, first of all to achieve pre-class, after-Class review and preview, in Java Learning, to keep a sober mind at all times, and students to communicate with each other, learn from each other;
In learning to help others or others to help themselves.
I believe that in the continuous Java learning process, after a period of 4 months to learn I must be successful!
Java Learning Note 3