The Gateway to Computer Science Excellence
+1 vote
966 views
which of the following can not be declared static ?

a)class   b)object    c)functions    d)member variables
in Object Oriented Programming by Active (2.3k points) | 966 views

1 Answer

+1 vote
A. Class

In Java, only nested classes can be declared static.
by Active (3.3k points)
0
and object ?
0
public static void main it is declared for class...I think object will be the answer
0

@Meenakshi Sharma Yes, an object can be static.
@Pavan Kumar Munnam That declaration is of main method, not class.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
198,209 comments
104,890 users