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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a consumer in java?

556


What is a class variable?

558


Explain about member inner classes?

577


Can the garbage collection be forced by any means?

526


What is native method in java?

556






What are selection structures?

527


What are white spaces in java?

516


What is the size of string?

549


Explain the scope of a variable.

622


I don’t want my class to be inherited by any other class. What should I do?

567


What happens if we don’t define serial version uid?

559


What are the high-level thread states in java programming?

573


Is there a case when finally will not execute?

559


What’s the difference between unit, integration and functional testing?

606


What is the synonym of framework?

553