Select the correct command line to execute the program and produce "The word is gamma" as the output line. : Questions « Java Source And Data Type « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Java Source And Data Type » Questions 




public class Demo {
      public static void main(String args[]){
        System.out.println("The word is " + args] );
      }
   }


   A.      Demo alpha beta gamma delta
   B.      java Demo alpha beta gamma delta
   C.      java Demo beta gamma delta
   D.      java Demo.class beta gamma delta
   E.      java Demo.class alpha beta gamma delta














1.30.Questions
1.30.1.What is the output from the following code(array index)?
1.30.2.Answer: array index
1.30.3.Which of the following are true about this method declaration?
1.30.4.Answer: method declaration
1.30.5.Which of the following are true about this variable declaration?
1.30.6.Answer: variable declaration
1.30.7.What is the output from the following program?
1.30.8.Answer: static method and instance variable
1.30.9.What will be the result of trying to compile and run the following code?
1.30.10.Answer: main method
1.30.11.Select the correct command line to execute the program and produce "The word is gamma" as the output line.
1.30.12.Answer: main method parameter passin
1.30.13.Which of the following are not reserved words in Java?
1.30.14.Answer: reserved words in Java
1.30.15.What is the range of values that can be stored in a byte primitive variable?
1.30.16.Answer: range of values of a byte primitive variable
1.30.17.What is the range of values that can be stored in a long primitive?
1.30.18.Answer: range value for long primitive
1.30.19.Which of the following would be illegal identifiers for a Java variable?
1.30.20.Answer: identifiers for a Java variable
1.30.21.After the following code has been executed, what is the value of types[0]?
1.30.22.Answer: array element value
1.30.23.Which of the following class declarations are not correct Java declarations?
1.30.24.Answer: synchronized declaration
1.30.25.Which of the following declaration sets the proper access for MyAccess class in yourpackage package to not allow subclass?
1.30.26.Answer: package and subclass
1.30.27.what is/are true about the widgetCount variable?
1.30.28.Answer: static variable
1.30.29.File Derived.java contains the following classes, what will happen when this file is compiled?
1.30.30.Answer: derived class
1.30.31.What happens when you try to use multiple Widget objects in multiple Threads?
1.30.32.Answer: static variable(2)
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.