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

What is stored procedure. How do you create stored procedure ?

1480


What is the purpose of final keyword and when to use it?

515


When should I use singleton?

514


What is the main function in java?

518


What is the final class modifier?

551






How many types of string data types are there?

549


What do you mean by inner class in java?

556


How will you get the platform dependent values like line separator, path separator, etc., ?

573


How many bits are in a sentence?

574


What is a module function?

549


How we create object in copy constructor?

634


What is the use of 'super' keyword inside a constructor?

552


Why string is a class?

536


What is a method vs function?

543


What is entry set in java?

521