Java Basics Entry Clearance detection

Source: Internet
Author: User

First,JAVA Basic knowledge point question and Answer (1,2,3 chapters)

1, the installation of jdk1.6.0_06 software. ( Please install in the C:\Java directory )

2. How is the JAVA development environment configured? (i.e.:java_home , Path , CLASSPATH configuration)

3. What are the steps to develop a JAVA application? (Procedure below)

public class Firstsample {

public static void Main (string[] args) {

System.out.print (" welcome you to Beijing, come ");

System.out.print (" pu ke excellent letter ");

System.out.println (" Learn! ");

System.out.println ("From the practical point of departure from the project is our direction!") );

Secondsample.add (5,6);

}

}

Class Secondsample {

public static void Add (int a,int b) {

System.out.println (A + "+" + B + "=" + (a+b));

}

}

Class Thirdsample {

}

Note: The following questions must be mastered through this program:

n what should you pay attention to when JAVA program is filed

n JAVA , What is the public class and What is the main class ?

n what is the order of execution of JAVA programs ? (that is, analyze the program, write strict output on the paper)

n JAVA Program writing should pay attention to the hierarchy structure, to understand when to indent, when should not be indented?

n what is the compilation and operation of JAVA programs? ( i.e.:1,javac source program 2,java Byte-code file )

How Many bytecode files does the JAVA program compile? Which is the one that can run? What is their relationship?

n the framework structure of JAVA application applications?

What is the difference between n println ()andprint () ?

n How can you know at a glance what is a class, method, array, parameter, method return value type.

4. What are the basic data types of JAVA and what are their characteristics? ( must be able to write out the data type's keywords, such as:int)

5. What are the variables in JAVA, How to define a variable, and how to assign a value to a variable?

6, write a JAVA program to test the definition of 8 Basic types of variables, assignments, and output the values of the variables.

7. What are the types of operation symbols in JAVA, and what should be injected into various operators? ( must be able to write out each operator )

8. What are the limitations of JAVA identifiers? Is the keyword available as an identifier? Why are identifiers usually named?

9. What is an escape character? (or cite the usual escape characters)

10, the data type under what circumstances to use the cast, under what circumstances will automatically convert? Please implement it programmatically.

11. What is a character and what is a string? What are the common methods of strings? (examples can be illustrated)

12. What are the three types of process control structures in JAVA?

13, please program Test Three forms of the IF statement?

14. Test The application of the while statement,do-while statement, for statement. (Three different loops for 1 to three increments)

15. Please program and test the application of multi-branch selection structure switch statement. What should be noted with the switch statement, and How is the switch statement executed?

16, what is an array, what are the characteristics of a one-dimensional array? How to declare a one-dimensional array, how to create a one-dimensional array, and how to initialize an array? (preferably a programming implementation)

17. What is the difference between string strings and char characters? is the String Class A reference type? in which package of the Java language does the String class automatically import? What are the common ways to test their applications?

18, the Math class is included in which package, commonly used methods ABS (), random ( ),pow (), For applications such as round () and constant PI , please test their application programmatically.

19. In JDK5 or above, which method should I use to format the numeric output? What are the commonly used format symbols (or programming instructions)?

20. What is a class, what is an object, and what is the relationship between a class and an object?

21. What are the three major features of object-oriented programming (OOP)? What is the core of OOP?

22. What are the three elements of an object?

23. What is a method, and what is a method framework structure? What is the type, method name, formal parameter, argument, etc. of the method's return value? When do I need a return statement and when do I need it?

24. What is the overloaded method? Why do you want to implement overloading of methods? How are overloaded methods resolved?

25. What does the class consist of? How do I define a class? How do I apply a class?

26. What is a constructor and what does it do? Why are constructors overloaded?

27. After declaring object variables and creating objects (instantiation of classes), how they are represented in memory, please draw.

28, in the class, how to embody the encapsulation? What are the benefits of encapsulation?

29. Special Keywords: This, what does it represent? Where and when is it used? What are the two ways to use it? What should you pay attention to when using this, can it appear in static methods?

30. What are immutable instance variables?

Ii. writing JAVA Applications

1, using the arithmetic operator to get a 4-bit decimal number of the numbers and output, and then output the number of reverse order number and the sum of squares after the number of members.

2, write the program to achieve the following functions: Print output 1~2000 can be divisible by 3 and can be divisible by 8 before Integer, and only 5 can be entered per line .

3, programming to seek 1!+2!+ ...  +15! (Note: overflow)

4, write Java application, output Fipolaci series of the first item (1,1,2,3 ,5,8... ), and only 5 data can be output per line .

5.

Write a Java application, pass in two integers from the keyboard, when the program runs, according to the screen prompts to choose two number of quotient, redundancy or exit program. (Hint: The screen menu looks like this:)

6. WriteJavaapplication, the judge randomly produces a0- -(including0and the -) is a student of a section --100; the- the; -- -; -- the;0- -, and then the input results correspond to:A,B,C,D, "Come on, keep trying!" "

7. Randomly produce ten integers, store them in an array of integers, and then write a method to sort the 10 integers in the array. The last 10 digits before sorting on the screen and the 10 numbers after sorting.

8.

Write a J-AVA application that outputs a diamond in the form below.

9, Write Java application, China ancient people put forward "hundred money to buy hundred chickens", namely: Rooster 5 yuan A, hen 3 yuan A, chicken 1 Yuan Three only, ask: finally can buy the rooster How much are the hens and chickens, respectively?

10, write Java applications, in the main method in the definition of the string "The first snow came, how beautiful it was!", the count of the number of letters T or T appear. (Hint: implemented using loops and common methods of the String class)

11. Write Java applications, pass multiple strings into the program from the command line, and export them to the screen in reverse order.

12, write the application, in the main method in the definition of the string "1.235678e2", "87.8f" and "128", they are converted to the corresponding double, float and int and output, the last output of the three number of the and (the result is reserved to two digits after the decimal point).

13, write the Java application, after the program runs, according to the screen prompts to enter a numeric string, enter after the statistics of how many even numbers and odd numbers.

Java Basics Entry Clearance detection

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.