[Go to site: main page, start]

0% found this document useful (0 votes)
6 views4 pages

Java Introduction Notes

Java is a high-level, object-oriented programming language created by James Gosling and his team at Sun Microsystems, with its first public version released in 1995. It is designed to be platform-independent, secure, and robust, allowing applications to run on any system with a Java Virtual Machine (JVM). Key features include automatic garbage collection, exception handling, and a simple syntax, making it suitable for various applications such as web development, enterprise solutions, and mobile apps.

Uploaded by

purabdon9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Java Introduction Notes

Java is a high-level, object-oriented programming language created by James Gosling and his team at Sun Microsystems, with its first public version released in 1995. It is designed to be platform-independent, secure, and robust, allowing applications to run on any system with a Java Virtual Machine (JVM). Key features include automatic garbage collection, exception handling, and a simple syntax, making it suitable for various applications such as web development, enterprise solutions, and mobile apps.

Uploaded by

purabdon9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

​●​ ​Java is a :-​

​1.​ ​High-level, object-oriented programming language.​


​■​ ​High-level:​​A language that is easy for humans to read, write, and understand​
​(close to English).​
​■​ ​Object-oriented:​​A way of programming where everything is designed using​
​real-world objects like Student, Car, or Bank.​
​■​ ​Programming language:​​A language used to give instructions to a computer​
​to perform tasks.​
​2.​ ​Platform because it provides an environment (JVM + JRE + libraries) to run​
​applications.​

​Who made Java?​


​●​ ​Java was created by​​James Gosling​​and his team at​​Sun Microsystems​​.​

​●​ ​Work started in​​1991​​under a project called​​Green Project​​.​

​●​ ​The​​first public version (Java 1.0)​​was released in​​1995​​.​

​●​ ​That’s when Java officially became available to developers.​

​●​ ​The language’s original name was​​Oak​​.​

​●​ ​James Gosling named it after an​​oak tree​​outside his office.​

​Why did the name change from Oak to Java?​


​●​ ​The name​​Oak​​was already trademarked by another company.​

​●​ T
​ he team chose​​Java​​as a new name — inspired by coffee culture (they drank lots of coffee​
​while working).​

​Basic idea of Java​

“​ ​Write Once, Run Anywhere​​” — the same program could run on different systems using the Java​
​Virtual Machine (JVM).​

​●​ ​Designed to be: Simple, Secure, Portable​


​●​ ​Features of Java​
​1.​ P
​ latform-Independent​​:​​Java applications are designed to run on any platform that has a​
​Java Virtual Machine (JVM) without requiring modification.​
​●​ ​Bytecode : Java source code is compiled into an intermediate form called bytecode​
​(.class files). Bytecode is platform-independent and can be executed on any system​
​with a compatible JVM. This bytecode is portable across different operating systems​
​and hardware configurations.​

​2.​ O
​ bject-Oriented​​:​​Java is built around the principles of object-oriented programming (OOP),​
​which organizes software design around data, or objects, rather than functions and logic.​
​●​ ​Encapsulation​
​●​ ​Inheritance​
​●​ ​Abstraction​
​●​ ​Polymorphism​

​3.​ ​Robust​​:​​Java is designed to be a reliable and error-resistant programming language.​


​a.​ ​Exception Handling : Java uses a structured approach to handle runtime errors​
​through exceptions. The language provides robust exception handling mechanisms​
​using try, catch, finally, and throw keywords, enabling developers to handle and​
​recover from errors gracefully.​
​b.​ ​Automatic Garbage Collection : Java’s garbage collector automatically reclaims​
​memory used by objects that are no longer reachable, reducing the risk of memory​
​leaks and ensuring efficient memory management.​
​c.​ ​Type Checking : Java performs strict type checking at compile-time and runtime. This​
​ensures that operations are performed on compatible data types and helps catch​
​errors early in the development process.​

​4.​ S
​ ecure​​: Java Security refers to the built-in features that protect Java applications from​
​unauthorized access and harmful actions. It uses mechanisms like bytecode verification,​
​sandboxing, and a security manager to control program behavior and keep the system safe.​

​5.​ P
​ ortable​​:​​Java's portability allows compiled programs to run on any platform with a JVM,​
​ensuring cross-platform compatibility.​
​a.​ ​Bytecode and JVM : Java compiles code into platform-independent bytecode,​
​executable on any JVM.​
​b.​ ​No Recompilation : Unlike C/C++, Java doesn't require platform-specific​
​recompilation.​
​c.​ ​Standard Libraries : Libraries handle system-specific differences, maintaining​
​consistent behavior.​
​d.​ ​Example : A Java app compiled on Windows runs seamlessly on Linux or macOS if​
​JVM is installed.​
​6.​ ​Simple:​​Java is easy to learn and use because its syntax is clear and removes complex features​
​of C/C++.​

​7.​ ​Multithreaded​​: Java supports running multiple tasks at the same time using threads.​

​8.​ ​Distributed​​: Java helps create applications that work over networks and communicate with other​
​systems.​

​9.​ ​Dynamic​​: Java programs can change behavior during runtime, making them flexible.​

​10.​​High Performance​​: Java gives good performance using advanced JVM technologies.​

​Uses of Java:​

​ .​
1 ​ eb Development​
W
​2.​ ​Enterprise Applications​
​3.​ ​Mobile Applications​
​4.​ ​Desktop Applications​
​5.​ ​Big Data Technologies​
​6.​ ​Cloud Computing​

​JVM (Java Virtual Machine)​


​●​ ​Small engine that​​actually runs​​the Java program.​

.class​​file (bytecode) → converts into machine code.​


​●​ ​Takes​​

​●​ ​Main role =​​Execution​​.​

​●​ ​Without JVM, Java programs cannot run.​

​JRE (Java Runtime Environment)​


​●​ ​The environment needed to​​run​​Java.​

​●​ ​JRE = JVM + required libraries/files.​

​●​ ​Users who only want to run apps install JRE.​


​JDK (Java Development Kit)​
​●​ ​Full package for​​developers​​.​

javac​​(compiler), debugger, etc.​


​●​ ​JDK = JRE + JVM + tools like​​

​●​ ​Used to write, compile, and run Java programs.​

​JDK → for DEVELOPING​

​└── JRE → for RUNNING​

​└── JVM → for EXECUTING​

You might also like