if a java file without any source code is valid java file?

Answer Posted / la_di

(I suppose you mean IS not IF)

No, an empty file is not a valid java file since you have
to use the same class-name as file name. (A file with a
valid class declaration but an empty body is valid thou)

Is This Answer Correct ?    5 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When would you use a static class?

592


What is the difference between yielding and sleeping in java programming?

595


Can we restart a dead thread in java?

564


What is hashset in java?

543


Do we need to manually write Copy Constructor?

614






What is data structure in java?

545


Can a class extends itself in java?

537


What do you mean by platform independence of Java?

540


Is array size fixed in java?

557


What is the exact difference in between Unicast and Multicast object? Where will it be used?

593


Explain about narrowing conversion in java?

574


What is the scope or life time of instance variables?

668


What is a java predicate?

543


What is the tradeoff between using an unordered array versus an ordered array?

676


Can you access the private method from outside the class?

522