Every great story on the planet happened when someone decided not to give up, but kept going no matter what.
--Your friends at LectureNotes

Note for Object Oriented Programming Using JAVA - OOPJ By debasish pradhan

  • Object Oriented Programming Using JAVA - OOPJ
  • Note
  • Biju Patnaik University of Technology Rourkela Odisha - BPUT
  • Computer Science Engineering
  • 17 Topics
  • 978 Offline Downloads
  • Uploaded 1 year ago
Debasish Pradhan
Debasish Pradhan
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

JAVA PROGRAMMING What is Java Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has a runtime environment (JRE) and API, it is called a platform. Java Example Let's have a quick look at Java programming example. A detailed description of hello Java example is available in next page. 1. class Simple{ 2. public static void main(String args[]){ 3. System.out.println("Hello Java"); 4. } 5. } Application According to Sun, 3 billion devices run Java. There are many devices where Java is currently used. Some of them are as follows: 1. 2. 3. 4. 5. 6. 7. 8. Desktop Applications such as acrobat reader, media player, antivirus, etc. Web Applications such as irctc.co.in, javatpoint.com, etc. Enterprise Applications such as banking applications. Mobile Embedded System Smart Card Robotics Games, etc. Types of Java Applications There are mainly 4 types of applications that can be created using Java programming: 1) Standalone Application Standalone applications are also known as desktop applications or window-based applications. These are traditional software that we need to install on every machine. Examples of standalone application are Media player, antivirus, etc. AWT and Swing are used in Java for creating standalone applications. BY-Mr. DEBASISH PRADHAN , CONTACT-8763502967 Page 1

Text from page-2

JAVA PROGRAMMING 2) Web Application An application that runs on the server side and creates a dynamic page is called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are used for creating web applications in Java. 3) Enterprise Application An application that is distributed in nature, such as banking applications, etc. is called enterprise application. It has advantages of the high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications. 4) Mobile Application An application which is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications. Java Platforms / Editions There are 4 platforms or editions of Java: 1) Java SE (Java Standard Edition) It is a Java programming platform. It includes Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.math etc. It includes core topics like OOPs, String, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc. 2) Java EE (Java Enterprise Edition) It is an enterprise platform which is mainly used to develop web and enterprise applications. It is built on the top of the Java SE platform. It includes topics like Servlet, JSP, Web Services, EJB, JPA, etc. 3) Java ME (Java Micro Edition) It is a micro platform which is mainly used to develop mobile applications. 4) JavaFX It is used to develop rich internet applications. It uses a light-weight user interface API. History of Java The history of Java is very interesting. Java was originally designed for interactive television, but it was too advanced technology for the digital cable television industry at the time. The history of java starts with Green Team. Java team members (also known as Green Team), BY-Mr. DEBASISH PRADHAN , CONTACT-8763502967 Page 2

Text from page-3

JAVA PROGRAMMING initiated this project to develop a language for digital devices such as set-top boxes, televisions, etc. However, it was suited for internet programming. Later, Java technology was incorporated by Netscape. The principles for creating Java programming were "Simple, Robust, Portable, Platformindependent, Secured, High Performance, Multithreaded, Architecture Neutral, ObjectOriented, Interpreted and Dynamic". Currently, Java is used in internet programming, mobile devices, games, e-business solutions, etc. There are given the significant points that describe the history of Java. James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. The small team of sun engineers called Green Team. Originally designed for small, embedded systems in electronic appliances like set-top boxes. Firstly, it was called "Greentalk" by James Gosling, and file extension was .gt. After that, it was called Oak and was developed as a part of the Green project. Why Java named "Oak"? Why Oak? Oak is a symbol of strength and chosen as a national tree of many countries like U.S.A., France, Germany, Romania, etc. In 1995, Oak was renamed as "Java" because it was already a trademark by Oak Technologies. Why Java Programming named "Java"? According to James Gosling, "Java was one of the top choices along with Silk". Since Java was so unique, most of the team members preferred Java than other names. Java is an island of Indonesia where first coffee was produced (called java coffee). Notice that Java is just a name, not an acronym. Initially developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995. In 1995, Time magazine called Java one of the Ten Best Products of 1995. JDK 1.0 released in(January 23, 1996). Java Version History Many java versions have been released till now. The current stable release of Java is Java SE 10. BY-Mr. DEBASISH PRADHAN , CONTACT-8763502967 Page 3

Text from page-4

JAVA PROGRAMMING 1. JDK Alpha and Beta (1995) 2. JDK 1.0 (23rd Jan 1996) 3. JDK 1.1 (19th Feb 1997) 4. J2SE 1.2 (8th Dec 1998) 5. J2SE 1.3 (8th May 2000) 6. J2SE 1.4 (6th Feb 2002) 7. J2SE 5.0 (30th Sep 2004) 8. Java SE 6 (11th Dec 2006) 9. Java SE 7 (28th July 2011) 10. Java SE 8 (18th March 2014) 11. Java SE 9 (21st Sep 2017) 12. Java SE 10 (20th March 2018) Features of Java A list of most important features of Java language is given below. 1. Simple 2. Object-Oriented 3. Portable 4. Platform independent 5. Secured 6. Robust 7. Architecture neutral 8. Interpreted 9. High Performance 10. Multithreaded 11. Distributed 12. Dynamic Simple Java is very easy to learn, and its syntax is simple, clean and easy to understand. According to Sun, Java language is a simple programming language because: o o o Java syntax is based on C++ (so easier for programmers to learn it after C++). Java has removed many complicated and rarely-used features, for example, explicit pointers, operator overloading, etc. There is no need to remove unreferenced objects because there is an Automatic Garbage Collection in Java. BY-Mr. DEBASISH PRADHAN , CONTACT-8763502967 Page 4

Lecture Notes