Java Classes Question:
Download Questions PDF

Methods declared as static have several restrictions:1) They can only call other static methods.2) They must only access static data.3) They cannot refer to this or super in any way Which of these are TRUE?
A) 1 and 2
B) 1 and 3
C) 2 and 3
D) 1, 2 and 3

Answer:

Ans is :(c)

b'coz static methods can call static as well as non static methods.

Download Java Classes Interview Questions And Answers PDF

Previous QuestionNext Question
In this example class-var = new classname( ); The class name followed by parentheses specifies the _________ for the class

A) Variables
B) Constructor
C) Objects
D) Memory
Stacks are controlled through two operations traditionally called ___ and _____

A) Push and Pull
B) Push and Pop
C) Pop and Pull
D) Pop and Peep