Java Questions

Q:

If super class ref is pointing sub class object then by using super class ref is it possible to call sub class newly defined method?

Answer

yes if the method is ovreriding method


no if the method is not overriding method

Report Error

View answer Workspace Report Error Discuss

Subject: Java

134 1472
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 Report Error Discuss

Filed Under: Java
Job Role: Analyst , IT Trainer

20 20328
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 Report Error Discuss

Filed Under: Java

19 12929
Q:

What are the types of Collision Resolution Techniques and the methods used in each of the type?

Answer

Open addressing (closed hashing),


The methods used include: Overflow block,


 Closed addressing (open hashing)


The methods used include: Linked list, Binary tree…

Report Error

View answer Workspace Report Error Discuss

Subject: Java

16 12707
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
 
Answer & Explanation Answer: A) Accept parameters

Explanation:

Accept parameters are capabilities of functions in JavaScript.

Report Error

View Answer Report Error Discuss

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

13 14072
Q:

What is the importance of finally block in exception handling ?

Answer

A finally block will always be executed, whether or not an exception is actually thrown. Even in the case where the catch statement is missing and an exception is thrown, the finally block will still be executed. Last thing to mention is that the finally block is used to release resources like I/O buffers, database connections, etc.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

11 5168
Q:

Should a main() method be compulsorily declared in all java classes?

Answer No not required. main() method should be defined only if the source class is a java application.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

10 7790
Q:

What is String Args in Java?

Answer

String Args (String []) is an array of parameters of type String.


In Java, 'args' contains the supplied command-line arguments as an array of String objects. In other words, if you run your program as 'java MyProgram Hello World' then 'args' will contain ["Hello", "World"]. When a java class is executed from the console, the main method is what is called.

Report Error

View answer Workspace Report Error Discuss

9 2038