y cant i declare method like public final static show()

Answers were Sorted based on User's Feedback



y cant i declare method like public final static show()..

Answer / srikanth

Return type of the method is missing

Is This Answer Correct ?    5 Yes 0 No

y cant i declare method like public final static show()..

Answer / karthi

Return type of the method is missing

ex:
public final static void show(){}

now it ll work.

Is This Answer Correct ?    2 Yes 1 No

y cant i declare method like public final static show()..

Answer / raghavendra singh

every method declaration must has one return type(even void)
just before their method name.without return type method has
no meaning.so add some return type also here.

that's why i can't declare method like public final static
show()

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What does sprintf return?

0 Answers  


Define the term string pool?

0 Answers  


What is the diffrence between inner class and nested class?

0 Answers  


Can you explain the cs option of java interpreter?

0 Answers  


What is dynamic binding?

2 Answers  






what is meta-Inf?

2 Answers   Polaris,


finalize() method?

5 Answers  


Why packages are used?

0 Answers  


What is skeleton and stub? What is the purpose of those?

0 Answers  


Why should we use singleton pattern instead of static class?

0 Answers  


which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None

17 Answers  


how to convert Java project into Maven ?

0 Answers   Infosys,


Categories