0
Q:

# What is the output of this program ?class main_arguments {            public static void main(String [ ] args)             {                String [][] argument = new String[2][2];                int x;                argument[0] = args;                x = argument[0].length;                for (int y = 0; y < x; y++)                     System.out.print(" " + argument[0][y]);                        }        }

 A) 1 1 B) 1 0 C) 1 0 3 D) 1 2 3

Explanation:

In argument[0] = args;, the reference variable arg[0], which was referring to an array with two elements, is reassigned to an array (args) with three elements.
Output:
$javac main_arguments.java$ java main_arguments
1 2 3

Subject: Java - Technology
Exam Prep: GATE
Q:

Which of the following are capabilities of functions in JavaScript?

 A) Accept parameters B) Return a value C) Accept parameters and Return a value D) None of the above

Explanation:

Accept parameters are capabilities of functions in JavaScript.

Filed Under: Java - Technology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Database Administration , IT Trainer

15 19300
Q:

Which of the following statements about inheritance is false?

 A) Inheritance allows you to minimize the amount of duplicate code in an application by sharing common code among several subclasses. B) A subclass inherits all the members (fields, methods, and nested classes) from its superclass. C) Through inheritance, a parent class is a more specialized form of the child class. D) Inheritance allows you to reuse the fields and methods of the super class without having to write them yourself.

Answer & Explanation Answer: C) Through inheritance, a parent class is a more specialized form of the child class.

Explanation:

4 6124
Q:

Exception handling is targeted at

 A) Compile time error B) Logical error C) Run time error D) All of the above

Explanation:

Filed Under: Java - Technology
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

6 6383
Q:

How many constructors can a class have?

 A) 1 B) 2 C) 4 D) None of the above

Explanation:

A class can have any number of constructors. If a class have more than one constructor, we call it as the constructor is overloaded.

Filed Under: Java - Technology
Job Role: Database Administration , IT Trainer

13 9150
Q:

How to call a constructor in java?

Constructor chaining is the process of calling one constructor from another constructor with respect to current object.

Within same class: It can be done using this() keyword for constructors in same class

From base class: by using super() keyword to call constructor from the base class.

1538
Q:

Which of the following is not a keyword?

 A) assert B) pass C) eval D) nonlocal

Explanation:

"eval" is not a keyword and is can be used as variable.

Filed Under: Java - Technology

45 30210
Q:

Warning implicit declaration of function?

Function: A Function is a block of statement which perform some operation.

Declaring the function before using the function in program is known as implicit declaration of the function.

For Example::

int bar(void); // function (forward) declaration

int main(void) {

bar(); // bar was declared, the compiler has all the info

return foo(123); // foo not yet known; impl. decl. warning

}

// not previously declared function definition

int foo(int a) {

return a;

// previously declared function definition

int bar() {

return 321;

}

Subject: Java - Technology
Job Role: IT Trainer , Analyst

1836
Q:

Is it possible to nest functions in javascript?