Can we have multiple classes in a single file?
Answer / Rahul Bhatia
Yes, it is possible to have multiple classes within the same Java source file. Each class should be defined separately and should follow specific naming conventions (each class should have its own .java extension). However, only one public class per file is required to compile and run the program.
| Is This Answer Correct ? | 0 Yes | 0 No |
wahts is mean by thread?
22 Answers HCL, TCS,
How many bits is a boolean?
Can one thread block the other thread?
How do you check if a string is lexicographically in java?
Can we place the any object to key attribute of HashMap<key,value>?
who was the founder of java
32 Answers CTS, HCL, ProKarma,
can java object be locked down for exclusive use by a given thread? : Java thread
Why scanner is used in java?
Explain how can you debug the Java code?
Why hashmap is used in java?
What is the difference between dom and sax parser in java?
State two differences between C and Java.