Beginner's introduction: A little experience in learning Java

Source: Internet
Author: User
Tags define interface return variable thread
Experience

In Java, the study of private school is almost finished, and suddenly want to summarize their learning experience.

I think in the early stages of Java, as little as possible, tools, like Eclipse,jbuild, can be used one o'clock in the evening,

At the beginning there is a WordPad and JDK on it, I think at the beginning of the main is to lay a solid foundation, or sometimes a lot of tools to help you generate,

is also in order to cultivate a good programming habit, the initial time or oneself more move to do well, after all, did not learn to walk running certainly not fast.

Learn Java must first Java's several basic elements to learn.

1, data type: Java is a strongly typed language, the various types are not automatically converted, you must first define before use.

2, Method: method is equivalent to define a "macro", a "function", the method is defined in the format of: "Descriptor modifier return value method name (parameter) {method body}. "

When learning a method, pay attention to the three things, "specifiers," "modifiers," "return values."

3, class: in Java most often hear words, but also the most troublesome things.

4. Variable constants: Java constant names are generally expressed in uppercase letters, and in order to conserve memory, generally defined as static (in the Java program, we often have a default rule, class name all words first letter uppercase,

Method name the second word starts with the first letter capitalized, the variable name is lowercase, so we look at the procedure is very clear, from childhood nurturance good habit, hehe. When learning variables, pay attention to two special things such as "This" and "super".

At the same time we will learn what is called "overlay", "overload."

5, control Flow: All programming language control statements are just a few if else for the while do switch.

6, interface: An abstract thing, the interface can be more inherited, solve the class can only single inheritance problem.

7, thread: thread is a more complex thing, such as a horse racing program has seven horse race, there are seven threads,

It looks like it's running at the same time, but the computer is allocating different time periods to allow seven threads to run. Our beginner's program may not be used.

So far, the basic concept of Java we have a certain understanding, we began to study the Java class.

The Java Core APIs (that is, the classes that Sun has written for us) have the following. (There are many other extensions)

Java.lang java.io java.util java.net java.awt java.applet java.sql java.text

There are many methods for each class, different types of objects, different methods to use, we'd better have a class library in hand,

Can be consulted at any time, if your English is good, you can also go to Sun Company's website or use the JBuilder help document.

No one can remember the use of so many classes at once, and not all classes are useful to our programs,

We are of course choosing the classes we need to learn.

General procedures can not escape string operations, file operations, database operations,

So Java.lang java.io java.sql These few classes we have to see.

Since this is just an introduction to the experience of learning Java, perhaps you have read this article even a Hello world can not make up,

But if I can save a little time for everyone in a thick Java book, I think it's a bit of a contribution.

I hope you quickly find the right things for yourself in Java (because Java is too powerful).



Related Article

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.