Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / kartik kudada

Yes, It is possible .

java file can be empty.
You could check it eclipse.

Is This Answer Correct ?    15 Yes 3 No

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

Answer / gaurav kumar

yes a java file without any source code is valid java file.
it will compile without any error but while running it gives
error-
"could not find or load main class----"

Is This Answer Correct ?    0 Yes 0 No

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

Answer / 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

More Core Java Interview Questions

What are legal modifiers that we can use to declare an inner class?

1 Answers   Infosys,


What are the methods to rectify ambiguities in the interfaces in JAVA?

0 Answers   CGI,


what is the use of abstract class?

3 Answers   Amdocs, Atos Origin, Invictus,


Write a method that will remove given character from the string?

0 Answers  


Can a class be private or protected in java?

0 Answers  


What is the abstract class?

0 Answers  


What is method overloading and method overriding?

0 Answers  


What is a null point?

0 Answers  


Can we execute java program without main method?

0 Answers  


Will set allow duplicates in java?

0 Answers  


What is a local, member and a class variable?

0 Answers  


what is the use of clone() in real time scenario?

2 Answers   Quinnox,


Categories