Interview question
What is Java and what are its main features? Java क्या है और इसकी मुख्य विशेषताएं क्या हैं?
Answer
Java is a high-level, object-oriented, platform-independent programming language developed by Sun Microsystems (now Oracle). It follows the principle 'Write Once, Run Anywhere' (WORA).
| Feature | Description |
|---|---|
| Platform-Independent | Runs on any platform with JVM installed |
| Object-Oriented | Everything is an object, supports OOP principles |
| Secure | Built-in security features and bytecode verification |
| Robust | Strong type checking, exception handling, memory management |
| Multi-threaded | Built-in support for concurrent programming |
| Portable | Compiled code can run on any platform |
| High Performance | JIT compilation, garbage collection optimization |
| Distributed | Support for network programming and RMI |
// Java Program Structure
public class HelloWorld {
public static void main(String[] args) {
System.out.println('Hello, Java!');
}
}
// Key Points:
// 1. Java is compiled to bytecode (.class files)
// 2. Bytecode runs on JVM (Java Virtual Machine)
// 3. One compile, run anywhere principle
// 4. Garbage collection automatically manages memory
// 5. Strong type system ensures type safety
// 6. Exception handling for error management
// 7. Multi-threading support for concurrent execution
// 8. Rich standard library (Java API)Java एक high-level, object-oriented programming language है। यह 'Write Once, Run Anywhere' के सिद्धांत पर काम करता है।
| Feature | Description |
|---|---|
| Platform-Independent | किसी भी platform पर चल सकता है |
| Object-Oriented | OOP principles को support करता है |
| Secure | Built-in security features |
| Multi-threaded | Concurrent programming support |
Was this answer clear?