1. (TCO 1) Which command executes the Java class file Welcome.class? (Points : 6
ID: 3551084 • Letter: 1
Question
1. (TCO 1) Which command executes the Java class file Welcome.class? (Points : 6) javac Welcome.classexecute Welcome
run Welcome.class
java Welcome
Question 2. 2. (TCO 1) What is the default value of an integer variable when it is first declared? (Points : 6) 0
null
garbage
default
Question 3. 3. (TCO 1) How is a static method executed? (Points : 6) By specifying the object name, then a dot, then the method name.
By specifying the method name with any needed parameters.
By specifying the class name, then a dot, then the method name.
All of the above.
Question 4. 4. (TCO 1) Which of the following can be used to get a double value from the keyboard? (Points : 6) Formatter input = new Formatter(System.in); double value = input.nextDouble( );
Scanner input = new Scanner(System.out); double value = input.nextDouble( );
Formatter input = new Formatter(System.out); double value = input.nextDouble( );
Scanner input = new Scanner(System.in); double value = input.nextDouble( );
Question 5. 5. (TCO 1) Which of the following gets a double value from the user? (Points : 6) double x = JOptionPane.getDouble( 1. (TCO 1) Which command executes the Java class file Welcome.class? (Points : 6) javac Welcome.class
execute Welcome
run Welcome.class
java Welcome
Question 2. 2. (TCO 1) What is the default value of an integer variable when it is first declared? (Points : 6) 0
null
garbage
default
Question 3. 3. (TCO 1) How is a static method executed? (Points : 6) By specifying the object name, then a dot, then the method name.
By specifying the method name with any needed parameters.
By specifying the class name, then a dot, then the method name.
All of the above.
Question 4. 4. (TCO 1) Which of the following can be used to get a double value from the keyboard? (Points : 6) Formatter input = new Formatter(System.in); double value = input.nextDouble( );
Scanner input = new Scanner(System.out); double value = input.nextDouble( );
Formatter input = new Formatter(System.out); double value = input.nextDouble( );
Scanner input = new Scanner(System.in); double value = input.nextDouble( );
Question 5. 5. (TCO 1) Which of the following gets a double value from the user? (Points : 6) double x = JOptionPane.getDouble(
Explanation / Answer
(1) java Welcome
(2)0
(3)All of the above.
(4)
Scanner input = new Scanner(System.in); double value = input.nextDouble(
(5)double x = Double.parseDouble(JOptionPane.showInputDialog(
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.