0
Q:

How many constructors can a class have?

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

Answer:   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.

Q:

Exception handling is targeted at

A) Compile time error B) Logical error
C) Run time error D) All of the above
 
Answer & Explanation Answer: C) Run time error

Explanation:
Report Error

View Answer Workspace Report Error Discuss

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

0 50
Q:

How to call a constructor in java?

Answer

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.

Report Error

View answer Workspace Report Error Discuss

0 66
Q:

Which of the following is not a keyword?

A) assert B) pass
C) eval D) nonlocal
 
Answer & Explanation Answer: C) eval

Explanation:

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

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology

2 113
Q:

Warning implicit declaration of function?

Answer

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::




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


  2. int main(void) {

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

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

  5. }


  6. // not previously declared function definition

  7. int foo(int a) {

  8. return a;

  9. }

  10.  

  11. // previously declared function definition

  12. int bar() {

  13. return 321;

  14. }

Report Error

View answer Workspace Report Error Discuss

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

1 295
Q:

Is it possible to nest functions in javascript?

Answer

Yes, it is possible to nest functions in javascript.

Report Error

View answer Workspace Report Error Discuss

Subject: Java - Technology
Job Role: IT Trainer

1 302
Q:

Which of the following attribute can hold the JavaScript version?

A) script B) version
C) language D) none of the above
 
Answer & Explanation Answer: C) language

Explanation:

Language attribute contains the javascript versions.

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: Analyst , IT Trainer , Software Architect

2 1384
Q:

Which of the following best describes JavaScript?

A) a scripting language precompiled in the browser. B) an object-oriented scripting language
C) a low-level programming language. D) a compiled scripting language.
 
Answer & Explanation Answer: B) an object-oriented scripting language

Explanation:
Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: IT Trainer

0 1310
Q:

Javascript is interpreted by

A) Server B) Object
C) Client D) None of the above
 
Answer & Explanation Answer: C) Client

Explanation:

JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it is run.

The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute.

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: Analyst , IT Trainer

7 3832