Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Difference between operator overloading and function overloading

0 Answers   Tavant Technologies, Virtusa,


How does callback work in java?

0 Answers  


Explain the difference between scrollbar and scrollpane?

1 Answers  


Why a dead thread occurs?

0 Answers  


What are keywords in java?

0 Answers  






How do you include a string in java?

0 Answers  


When you declare a method as abstract method ?

2 Answers   HP,


How do you do descending order in java?

0 Answers  


Explain 5 io best practices?

0 Answers  


What does  mean in regex?

0 Answers  


What is public static?

0 Answers  


What is static and final keyword in java?

0 Answers  






Categories