y cant i declare method like public final static show()
Answers were Sorted based on User's Feedback
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 |
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 |
To obtain design information about an object, which class in used?
Which class has no duplicate elements?
How to retrieve data from database in java using arraylist?
How do you reverse sort a list in java?
what is a working thread? : Java thread
I have a String s = java; What is the output when I say s.replaceAll('j', 'k'); Also what is the value of s after replacing?
How to prevent to create multiple objects of a java class?
Does constructor return any value?
Which method must be implemented by all threads?
What differences exist between iterator and listiterator?
Write a program to reverse a number in java?
Is it possible to write method inside method