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 |
What is use of inner class in java?
Write a program to print count of empty strings in java 8?
Explain about the performance aspects of core java?
What is bufferedwriter?
Features of JAVA ? In which version of java synchronizedXXX() methods are included in Collections class.
How does compareto method work?
What do you understand by garbage collection in Java? Can it be forced to run?
what is the meaning of java.lang and java.util
What is array list in java?
what is the use of clone method? why user cant overwrite in sub class without its proper defination.
What is the difference between the ">>" and " >>>" operators in java?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?