OOP1 Lesson 2-7-16.pdf
Document Details
Uploaded by EasyPelican6373
Tags
Full Transcript
What is Java? Java is an object-oriented, cross-platform, 1 high level programming language P R O G R A M M I N G introduced in 1995 by Sun Microsystems. Today, Java hel...
What is Java? Java is an object-oriented, cross-platform, 1 high level programming language P R O G R A M M I N G introduced in 1995 by Sun Microsystems. Today, Java helps run many applications, including Sports, Social Media, Audio, Video, etc. O R I E I E N T E D O B J E C T History of Java The principles/features for creating Java 1 programming were "Simple, Robust, P R O G R A M M I N G Portable, Platform-independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-Oriented, Interpreted, and Dynamic". Java was O R I E I E N T E D developed by James Gosling, who is known as the father of Java, in 1995. O B J E C T History of Java 1) James Gosling, Patrick Naughton, and Mike Sheridan initiated the Java language project in June 1991. The small team of sun engineers 1 called Green Team. P R O G R A M M I N G 2) Initially it was designed for small, embedded systems in electronic appliances like set-top boxes. 3) It was first called as "Greentalk" by James O R I E I E N T E D Gosling, and the file extension was.gt 4) After that, it was called Oak and was developed as a part of the Green project. O B J E C T History of Java 5) Oak is a symbol of strength and chosen 1 as a national tree of many countries like the P R O G R A M M I N G U.S.A., France, Germany, Romania, etc. 6) In 1995, Oak was renamed as "Java" because it was already a trademark by Oak O R I E I E N T E D Technologies. O B J E C T History of Java 7) The team gathered to choose a new name. The suggested words were "dynamic", "revolutionary", "Silk", "jolt", "DNA", etc. They wanted something that reflected the essence of the technology: revolutionary, dynamic, lively, cool, unique, and easy to spell, and fun to say. According to James Gosling, "Java was one of the 1 top choices along with Silk". Since Java was so unique, most of the team members P R O G R A M M I N G preferred Java than other names. 8) Java is an island in Indonesia where the first coffee was produced (called Java coffee). It is a kind of espresso bean. Java name was chosen by James Gosling while having a cup of coffee nearby his office. O R I E I E N T E D 9) Notice that Java is just a name, not an acronym. O B J E C T History of Java 10) Initially developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995. 11) In 1995, Time magazine called Java one of the Ten Best Products of 1995. 1 P R O G R A M M I N G 12) JDK 1.0 was released on January 23, 1996. After the first release of Java, there have been many additional features added to the language. Now Java is being used in Windows applications, Web applications, enterprise applications, mobile applications, cards, etc. Each new version adds new features in Java. O R I E I E N T E D O B J E C T JAVA VERSIONS Many java versions have been released till now. The current stable release of Java is Java SE 10. 1. JDK Alpha and Beta (1995) 20. Java SE 18 (22nd March 2022) 2. JDK 1.0 (23rd Jan 1996) 21. Java SE 19 (20th September 2022) 3. JDK 1.1 (19th Feb 1997) 22. Java SE 20 (21st March 2023) 4. J2SE 1.2 (8th Dec 1998) 23. Java SE 21 (19th September 2023) 5. J2SE 1.3 (8th May 2000) 24. Java SE 22 (19th March 2024) 1 6. J2SE 1.4 (6th Feb 2002) P R O G R A M M I N G 7. J2SE 5.0 (30th Sep 2004) 8. Java SE 6 (11th Dec 2006) Since Java SE 8 release, the Oracle corporation 9. Java SE 7 (28th July 2011) follows a pattern in which every even version is 10. Java SE 8 (18th Mar 2014) release in March month and an odd version released 11. Java SE 9 (21st Sep 2017) in September month. 12. Java SE 10 (20th Mar 2018) 13. Java SE 11 (September 2018) O R I E I E N T E D 14. Java SE 12 (March 2019) 15. Java SE 13 (September 2019) 16. Java SE 14 (Mar 2020) 17. Java SE 15 (September 2020) 18. Java SE 16 (Mar 2021) 19. Java SE 17 (September 2021) O B J E C T O B J E C T O R I E I E N T E D P R O G R A M M I N G 1 JAVA CODE EXAMPLE About Java programs, it is very important to keep in mind the following points. Case Sensitivity − Java is case sensitive, which means identifier Hello and hello would have different meaning in Java. 1 Class Names − For all class names the first letter should be in Upper Case. If several words P R O G R A M M I N G are used to form a name of the class, each inner word's first letter should be in Upper Case. Example: class MyFirstJavaClass Method Names − All method names should start with a Lower Case letter. If several words O R I E I E N T E D are used to form the name of the method, then each inner word's first letter should be in Upper Case. Example: public void myMethodName() O B J E C T Program File Name − Name of the program file should exactly match the class name. When saving the file, you should save it using the class name (Remember Java is case sensitive) and append '.java' to the end of the name (if the file name and 1 P R O G R A M M I N G the class name do not match, your program will not compile). Example: Assume 'MyFirstJavaProgram' is the class name. Then the file should be saved as 'MyFirstJavaProgram.java‘ O R I E I E N T E D public static void main(String args[]) − Java program processing starts from the main() method which is a mandatory part of every Java program. O B J E C T