Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Core Java - Interview Questions and Answers for 'Static keyword' - 1 question(s) found - Order By Newest|
|Ans. static keyword is used to specify that the respective programming construct ( method , variable ) belongs to the class and not to its instance and is supposed to be shared by all instances of the class.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  static keyword Asked in 1 Companies basic   frequent|
|What do you mean by "Java is a statically typed language" ?|
|How can we run a java program without making any object?|
| Which of the following combination of keywords is illegal in Java ? |
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final
|What are the advantages and disadvantages of static variables and static methods ?|
|What are concepts introduced with Java 5 ?|
|Why do we write public static void main ? Can we use some other syntax too for main ?|
|Difference between Static and Singleton Class ?|
|Can we declare static variables as transient ?|
| Which of the following can be marked static ?|
a. Methods , Variables and Initialization Blocks.
b. Methods , Variables , Initialization Blocks and Outer Classes and nested Classes.
c. Methods , Variables , Initialization Blocks and Outer Classes.
d. Methods , Variables , Initialization Blocks and nested Classes
| Which of the following is false about main method ?|
a. It should be declared public and static
b. it should have only 1 argument of type String array
c. We can override main method
d. We can overload main method