Java练习题1(有答案)
第1题 ________ is an object-oriented programming language.
1、 Java
2、 C++
3、 C
4、 Ada
5、 Pascal
答案 1 2
第2题________ is Architecture-
公司采购管理办法
Neutral.
1、 Java
2、 C++
3、 C
变更抚养权协议书4、 Ada
5、 Pascal 答案 1
第3题 ________ is a technical definition of the language that includes the syntax and mantics of the Java programming language.
1、 Java language specification
2、 Java API
3、 Java JDK
4、 Java IDE 答案 1
第4题 ________ consists of a t of parate programs for developing and testing Java p
rograms, each of which is invoked from a command line.
1、 Java language specification
2、 Java API
3、 Java JDK
4、 Java IDE
答案 3
第5题 ________ provides an integrated development environment (IDE) for rapidly developing Java programs. Editing, compiling, building, debugging, and online help are integrated in one graphical ur interface.
1、 Java language specification
2、 Java API
3、 Java JDK
4、 Java IDE 答案 4 第6题
The main method header is written as: 1、
public static void main(string[] args)
提档过户流程
2、 public static void Main(String[] args)
3、 public static void main(String[] args)
4、public static main(String[] args)
5、public
void main(String[] args) 答案 3 第7题 Which of
the following statements is correct? 1、Every line
in a program must end with a micolon.
数学新课程标准
2、Every statement in a program must end with a micolon.
3、 Every comment line must end with a micolon;
4、 Every method must end with a micolon;
5、Every class must end with a micolon;
答案 2
第8题 Which of the following statements is correct to display Welcome to Java on the console?
1、 System.out.println( Welcome to Java );
2、 System.out.println("Welcome to Java");
3、 System.println( Welcome to Java );
4、 System.out.print( Welcome to Java );
5、 System.out.print("Welcome to Java"); 答
案 2 5
第9题Which JDK command is correct to run a Java application in ByteCode.class?
1、 java ByteCode
2、 java ByteCode.class
3、 javac ByteCode.java
4、 javac ByteCode
5、 JAVAC ByteCode 答案 1
第10题Suppo you define a Java class as
follows:
public class Test {
}
In order to compile this program, the source code should be stored in a file named
1、 Test.class过隙白驹
2、 Test.doc
3、
4、 Test.java
5、 Any name with extension .java 答案 4 第11题
The extension name of a Java bytecode file is
1、 .java
2、 .obj
3、 .class
4、 .exe 答案 3 第12题 Which of the following lines is
not a Java comment?
1、 /** comments */
2、 // comments
3、 -- comments
4、/* comments */
5、** comments ** 答案3 5 第13题 Which of the
卫生间英语following are the rerved words?
1、 public
2、 static
3、 void
4、 class 答案 1 2 3 4 第14题 To u JOptionPane in
your program, you may import it using:
1、 import javax.swing.JOptionPane;
2、 import javax.swing.*;
3、 import javax.*;
4、 import javax.*.JOptionPane; 答
雅思考试内容案 1 2
第15题 Which of the following are correct names for variables according to Java naming conventions?
1、 radius
2、 Radius
3、 RADIUS
4、findArea
5、FindArea 答案 1 4 第16题Which of the following are correct ways to declare variables?
1、 int length; int width;
2、 int length, width;
3、 int length; width;
4、 int length, int width; 答案 1
2 第17题____________ is the Java assignment
operator.
给老师的一封信300字1、 ==
2、 :=
3、 =
4、=: 答案 3 第18题Which of the following assignment statements is incorrect.
1、 i = j = k = 1;
2、 i = 1; j = 1; k = 1;
3、 i = 1 = j = 1 = k = 1;
4、 i == j == k == 1; 答案 3 4 第19题Which of the following is a constant, according to Java naming conventions? 1、 MAX_VALUE
2、Test
3、read
4、ReadInt