Which of the following is the output of the program? [code] class Test { public static void main(String args[]) { int

Which of the following is the output of the program?
Code:
class Test {
    public static void main(String args[]) 
    {
        int num = 10;
        System.out.println("The value of num is" +NUM);
    }
}
A. Compilation error
B. Run time error
C. Exception
D. The value of num is 10
 
Answer: a
Explanation: Java is case-sensitive. Identifier which is used to name variable and print are different.
This section of our 1000+ Object Oriented System Design MCQs focuses on Foundations of Object Model – 2.
1) Object oriented technology is built upon a sound engineering foundation, whose elements are collectively called as _________
A. Von Neumann Model
B. Object Model
C. Structured Model
D. Programming Model
 

Tìm kiếm

Back
Top