Nội dung text Java Programming BICTE Full Note.pdf
Java unit -1 Fundamental 1.1 history of java 2 History and Development of java:- java is related to C++, which is a direct descendent of C. much of the character of java is inherited from these two languages. C, java derives its syntax. Many of java’s object-oriented features were influenced by C++. The c language shook the computer world. Its impact should not be underestimated, because it fundamentally changed the way programming was approached and thought about . the creation of C was a direct result of the need for a structured, efficient, high- level language that could replace assembly code when creating systems program. Java’s core principles developed out of a desire to build software for consumer electronics. It all started out in 1990 when a team of Sun researchers developed some concepts for a new direction in high-tech, consumer-driven technology. Computers were everywhere and were the driving force behind many of the products in the home: the VCR, the microwave oven, the security system, and the stereo system. Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike Sheridan at Sun Microsystems, Inc. in 1991, ti took 18 months to develop the first working version. This language was initially called “Oak” but was renamed “java” in 1995. between the initial implementation of Oak in the fall of 1992 and the public announcement of java in the spring of 1995, many more people contributed to the design and evolution of the language. Bill Joy, Arthur van Hoff, Jonathan Payne, Frank Yelling, and Tim Lindholm were key contributors to the maturing of the original prototype. By 1993, it became obvious to members of the java design team that the problems of portability frequently encountered when creating, code for embedded controllers are also found when attempting to create code for the internet. In fact, the same problem that Java was initially designed to solve on a small scale could also be applied to the internet on a large scale. This realization caused the focus of java to switch from consumer electronic to internet programming . so, while the desire for an architecture –neutral programming language provided the initial spark, the internet ultimately let to java’s large scale success. The initial release of java was nothing short of revolutionary, nut is did not mark the end of java’s era of rapid innovation. Unlike most other software systems that usually settle into a pattern of small, incremental improvements, java continued to evolve at an explosive pace. Soon after the release of java 1.0, designers of java had already created java 1.1. the features added by java 1.1 were more significant and substantial than the increase in the minor revision. 1.2 Object Oriented Programming 1.1 object oriented programming is at the core of java. In fact, all java programs are object- oriented. WWW.NOTEDINSIGHTS.COM 1
1.3.1 java development kit 2 Java SE 17 Archive Downloads 3 Go to the Oracle Java Archive page. 4 The JDK is a development environment for building applications using the Java programming language. 5 The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the JavaTM platform. 6 WARNING: These older versions of the JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production. 7 For production use Oracle recommends downloading the latest JDK version. 8 Only developers and enterprise administrators should download these releases. 9 For current Java releases, please visit Oracle Java SE Downloads. 10 Java SE Development Kit 17.0.8 11 This software is licensed under the Oracle No-Fee Terms and Conditions License. 12 12.3 First java simple program Import java.lang.*; public class demo { public static void main(String args[]) { WWW.NOTEDINSIGHTS.COM 3
System.out.println(“Hello Students”); } } Skilton of java program Import packages Public class className { Variable declarations Int a,b,c; Method declaration Public void display() { Statements; } Public static void main(String args[]) { //Creating class object ClassName obj=new className(); //calling methods Obj.display(); } } 12.4 packages in java A java package is a group of similar types of classes, interfaces and sub-packages. Package in java can be categorized in two form, built-in package and user-defined package. There are many built-in packages such as java, lang, awt, javax, swing, net, io, util, sql etc. Here, we will have the detailed learning of creating and using user-defined packages. WWW.NOTEDINSIGHTS.COM 4