Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
48 views
Java Complete Notes
Na
Uploaded by
sonawaneprathmesh53
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java_Complete_Notes For Later
Download
Save
Save Java_Complete_Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
48 views
Java Complete Notes
Na
Uploaded by
sonawaneprathmesh53
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java_Complete_Notes For Later
Carousel Previous
Carousel Next
Save
Save Java_Complete_Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 125
Search
Fullscreen
Save COMPLETE * NOTES Scanned with CamScannerMALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY INDEX Topic OOP Concepts:- Data abstraction, encapsulation inheritance Benefits of Inheritance Polymorphism, classes and objects Procedural and object oriented programming paradigms Java Programming: History of Java Comments, Data types, Variables, Constants Scope and Lifetime of variables Operators, Operator Hierarchy, Expressions ‘Type conversion and casting, Enumerated types Control flow- block scope, conditional statements, loops, break and continue statements Simple java stand alone programs, arrays Console input and output, formatting output Constructors, methods, parameter passing Static fields and methods, access control, this reference, Overloading methods and constructors, recursion, garbage collection, Building strings, exploring string class. Scanned with CamScannerTopic Inheritance — Inheritance hierarchies super and sub classes, Member access rules super keyword, preventing inheritance: final classes and methods, the Object class and its methods, Polymorphism — dynamic binding, method overriding, abstract classes and methods. Interfaces- Interfaces Vs Abstract classes, defining an interface, implement interfaces Accessing implementations through interface references, extending interface. Inner classes- Uses of inner classes, local inner classes Anonymous inner classes, static inner classes, examples, Packages- Defining, creating and accessing a pack Understanding CLASSPATH, importing packages, Exception handling- Dealing with errors, benefits of exception handling The classification of exceptions- exception hierarchy, checked exceptions and unchecked exceptions Usage of try, catch, throw, throws and finally, Rethrowing exceptions, exception specif Built in exceptions, creating own exception sub classes. Multithreading — Differences between multiple processes and multiple threads, thread states Creating threads, interrupting threads, thread priorities, synchronizing threads Inter-thread communication, producer consumer pattern Exploring java.net and java.text. Scanned with CamScannerTopic Collection Framework in Java — Introduction to java collections, Overview of java collection framework, Generics Commonly used collection classes- Array List, Vector, Hash table, Stack, Enumeration, Iterator String Tokenizer, Random, Scanner, Calendar and Properties. Files- Sweams- Byte streams, Character streams, Text inpuVoutput, Binary input/output Random access file operations, File management using File class. Connecting to Database - JDBC Type | to 4 drivers, Connecting to a a database, Querying a database and processing the results, updating data with JDBC. GUI Programming with Java- The AWT class hierarchy, Introduction to Swing, Swing Vs AWT, Hierarchy for Swing | 95-100 components Containers ~ Jframe, JApplet, JDialog, JPanel 100-104 Overview of some Swing components — Jbutton, JLabel, . JTextField, JTextArea, simple Swing applications, aed Layout management — Layout manager types ~ border, grid and | 99.144 flow Event Handling- Events, Event sources, Event classes, Event 112 Listeners, 1-112 Relationship between Event sources and Listeners, Delegation 2 event model, 112-113, Handling a button click, Handling Mouse events, Adapter 14-116 classes. Applets — Inheritance hierarchy for applets 18-119 Differences between applets and applications, Life cycle of an applet, re Passing parameters to applets, applet security issues. 121 Scanned with CamScannerMALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY Unit-1 OOP Concepts Object. Oriented Programming is a paradigm that provides many concepts such as inheritance, data binding, polymorphism etc. Simula is considered as the first object-oriented programming language. The programming paradigm where everything is represented as an object is known as truly object-oriented programming language. Smalltalk is considered as the first truly object-oriented programming language. OOPs (Object Oriented Programming System) Object means a real word entity such as pen, chair, table etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts Object Class Inheritance Polymorphism Abstraction © Encapsulation Object Any entity that has state and behavior is known as an object. For example: chair, pen, table, keyboard, bike ete. It can be physical and logical. Class Collection of objects is called class. It is a logical entity. Inheritance ‘When one object acquires all the properties and behaviours of parent object i.e. known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism, JAVA PROGRAMMING Scanned with CamScannerPolymorphism When one task is performed by different ways i.e. known as polymorphism. For example: to convince the customer differently, to draw something e.g. shape or rectangle ete In java, we use method overloading and method overriding to achieve polymorphism. Another example can be to speak something e.g. cat speaks meaw, dog barks woof ete. Abstraction Hiding internal details and showing functionality is known as abstraction. For example: phone call, we don't know the internal processing. In java, we use abstract class and interface to achieve abstraction. Encapsulation Binding (or wrapping) code and data together into a single unit is known as encapsulation For example: capsule, it is wrapped with different medicines. A java class is the example of encapsulation, Java bean is the fully encapsulated class because all the data members are private here. Benefits of Inheritance One of the key benefits of inheritance is to minimize the amount of duplicate code in an application by sharing common code amongst several subclasses. Where equivalent code exists in two related classes, the hierarchy can usually be refactored to move the common code up to a mutual superclass. This also tends to result in a better organization of code and smaller, simpler compilation units, + Inheritance can also make application code more flexible to change because classes that inherit from a common superclass can be used interchangeably. If the return type of a method is superclass Reusability - facility to use public methods of base class without rewriting the same. Extensibility - extending the base class logic as per business logic of the derived class, JAVA PROGRAMMING Scanned with CamScanner+ Data hiding - base class can decide to keep some data private so that it cannot be altered by the derived class Procedural and object oriented program Features Procedural Object Oriented Progr Programming (OOPS) Divided into In POP. program is divided | im OOPs . the program is into smaller parts called as | divided into parts known as functions objects. In POP. importance is not | In OOPs. Importance is given to data but to | given to the data rather than functions as well. as| procedures or fictions sequence of actions to be | because it works as a real Approach POP follows Top Down | OOPs follows Bottom Up approach approach POP docs not have any | OOPs has acce access specifier amed Publi Pr et Data Moving In POP. Data can move | In OOPs. an move freely from fimction to | and communicate with each function in the system other through member Data Access In POP. Most function uses | In OOPs. data can not move Global data for sharing that | easily from function to can be accessed freely from | functionit can be kept function to function in the ate so we can system cess of data POP does not proper way for hi so provides more security so it is less secure Overloading In POP. Overloading is not | In OOPs. overloading is possible in the form o} Function Overloading and Operator Overloa: Examples c JAVA NET. c JAVA PROGRAMMING Scanned with CamScannerJava Programming- History of Java The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such as set-top boxes, televisions etc. For the green team members, it was an advance concept at that time. But, it was suited for internet programming. Later, Java technology as incorporated by Netscape. Currently, Java is used in internet programming, mobile devices, games, e-business solutions etc, There are given the major points that describes the history of java. 1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991, The small team of sun engineers called Green Team. 2) Originally designed for small, embedded systems in electronic appliances like set- top boxes. 3) Firstly, it was called "Greentalk” by James Gosling and file extension was .at. 4) After that, it was called Oak and was developed as a part of the Green project. Java Version History ‘There are many java versions that has been released. Current stable release of Java is Java SE 8. 1, JDK Alpha and Beta (1995) 2. JDK 1.0 (23rd Jan, 1996) 3. JDK 1.1 (19th Feb, 1997) . J2SE 1.2 (8th Dec, 1998) . J2SE 1.3 (8th May, 2000) . J2SE 1.4 (6th Feb, 2002) J2SE 5.0 (30th Sep, 2004) . Java SE 6 (11th Dec, 2006) Java SE 7 (28th July, 2011) 10.Java SE 8 (18th March, 2014) JAVA PROGRAMMING Scanned with CamScannerFeatures of Java There is given many features of java. They are also known as java buzzwords. The Java Features below are simple and easy to understand. Simple Object-Orie Portable Platform independent Secured Robust Se - Architecture neutral High Platform Pertomance $———__, Features of Java, independent eefonmance, lnerpetee 11. Multithreaded oy Robust 12,Distributed amie Architecture Portable Newral Java Comments The java comments are statements that are not executed by the compiler and interpreter. The comments can be used to provide information or explanation about the variable, method, class or any statement. It can also be used to hide program code for specific time. Types of Java Comments ‘There are 3 types of comments in java Single Line Comment Multi Line Comment Documentation Comment Java Single Line Comment ‘The single line comment is used to comment only one lin Syntax: IThis is single line comment JAVA PROGRAMMIN( Scanned with CamScannerExample: public class CommentExample! [ public static void main(Stringt] args) { int i=10,//Here, iis a variable System.out.printin(i); Output: 10 Java Multi Line Comment ‘The multi line comment is used to comment multiple lines of code. Syntax: rp This is multi line comment ” Example: public class CommentExample? [ public static void main(String{] args) { * Let's declare and print variable in java. */ int System.out.printin(i); vy Output: 10 JAVA PROGRAMMIN( Scanned with CamScannerJava Documentation Comment The documentation comment is used to create documentation API. To create documentation API, you need to use javadoc tool Syntax: ” Example: /** The Calculator class provides methods to get addition and subtraction of given 2 numbers.*/ public class Calculator ( /** The add) method returns addition of given numbers.*/ public static int add(int a, int b){return a+b;} /*’The sub() method returns subtraction of given numbers.*/ public static int sub(int a, int b){return ah;) ) Compile it by javac tool: jvac Calculator java Create Documentation API by ja javadoc Calculator java Now, there will be HTML files created for your Calculator class in the current directory. Open the HTML files and see the explanation of Calculator class provided through document JAVA PROGRAMMIN Scanned with CamScannerData Types Data types represent the different values to be stored in the variable, In java, there are two types of data types: © Primitive data types © Non-primitive Primitive Non-Primitive TS byte shore int Data Type Default Value Default size Java Variable Example: Add Two Numbers class Simple{ public static void main(String{] args)[ int int ystem.out.printin(c); yh Output:20 JAVA PROGRAMMIN( Scanned with CamScannerVariables and Data Types in Java Variable is a name of memory location. There are three types of variables in java: local, instance and statie. ‘There are two types of data types in java: primitive and non-primitive. Types of Variable There are three types of variables in java: © local variable instance variable ce. static variable 1)Local Variable A variable which is declared inside the method is called local variable. 2) Instance Variable A variable which is declared inside the class but outside the method, is called instance variable - It is not declared as static, 3) Statie variable A variable that is declared as static is called static variable. It cannot be local. ‘We will have detailed learning of these variables in next chapters. Example to understand the types of variables in java class A{ int data=50;//instance variable static int m=100;//static variable void method(){ int n=90;//local variable 1 Viend of class Constants in Java A constant is a variable which cannot have its value changed after declaration. It uses the ‘final’ keyword. Syntax modifier final dataType variableName = value; modifier static final dataType variableName = value: JAVA PROGRAMMIN Scanned with CamScanner
You might also like
Java Complete Notes
PDF
67% (3)
Java Complete Notes
125 pages
Shorted OOPs
PDF
No ratings yet
Shorted OOPs
114 pages
Java Programming Notes 4 128
PDF
No ratings yet
Java Programming Notes 4 128
125 pages
EIT CSE Notes
PDF
No ratings yet
EIT CSE Notes
126 pages
Java 4
PDF
No ratings yet
Java 4
9 pages
STUDENT JAVA PROGRAMMING NOTE ORIGINAL
PDF
No ratings yet
STUDENT JAVA PROGRAMMING NOTE ORIGINAL
79 pages
Java 3
PDF
No ratings yet
Java 3
7 pages
319 Cse Second Year Corrected Text Book
PDF
No ratings yet
319 Cse Second Year Corrected Text Book
377 pages
Yy60
PDF
No ratings yet
Yy60
50 pages
Unit 1 - OOPs Java
PDF
No ratings yet
Unit 1 - OOPs Java
38 pages
Java Programming
PDF
No ratings yet
Java Programming
106 pages
JAVA PROGRAMMING_NOTES
PDF
No ratings yet
JAVA PROGRAMMING_NOTES
128 pages
Object-Oriented Proramming: By: Nesredin A. (BSC, MSC)
PDF
No ratings yet
Object-Oriented Proramming: By: Nesredin A. (BSC, MSC)
43 pages
Oops Through Java Btech 3rd Year Notes
PDF
No ratings yet
Oops Through Java Btech 3rd Year Notes
48 pages
Unit - 1
PDF
No ratings yet
Unit - 1
85 pages
Unit-wisNotes_java1
PDF
No ratings yet
Unit-wisNotes_java1
20 pages
Java Notes
PDF
No ratings yet
Java Notes
177 pages
Java 1
PDF
No ratings yet
Java 1
39 pages
CS3391-Object Oriented Programming - by WWW - LearnEngineering.in
PDF
No ratings yet
CS3391-Object Oriented Programming - by WWW - LearnEngineering.in
173 pages
Cs3391 Oops Unit 1 Notes Eduengg
PDF
No ratings yet
Cs3391 Oops Unit 1 Notes Eduengg
60 pages
Module1 New
PDF
No ratings yet
Module1 New
37 pages
Oops Java
PDF
No ratings yet
Oops Java
115 pages
JAVA UNIT-1 Notes
PDF
No ratings yet
JAVA UNIT-1 Notes
94 pages
Module 1
PDF
No ratings yet
Module 1
180 pages
Introduction To Object Oriented Programming: by Megha V Gupta, NHITM
PDF
No ratings yet
Introduction To Object Oriented Programming: by Megha V Gupta, NHITM
34 pages
18BCS43C U1
PDF
No ratings yet
18BCS43C U1
42 pages
Important Notes On JAVA
PDF
No ratings yet
Important Notes On JAVA
19 pages
20201223-Java Programming
PDF
No ratings yet
20201223-Java Programming
128 pages
Java Notes
PDF
No ratings yet
Java Notes
259 pages
Unit 1
PDF
No ratings yet
Unit 1
107 pages
1.java Programming Unit 1
PDF
No ratings yet
1.java Programming Unit 1
87 pages
UNIT-1Introduction to java programming-Features of Java Language-JVM -The Java Environment- Fundamental Programming Structures in Java – Comments
PDF
No ratings yet
UNIT-1Introduction to java programming-Features of Java Language-JVM -The Java Environment- Fundamental Programming Structures in Java – Comments
45 pages
Java First Unit
PDF
No ratings yet
Java First Unit
37 pages
Ii Bca Java
PDF
No ratings yet
Ii Bca Java
204 pages
Unit-I Introduction To Java
PDF
No ratings yet
Unit-I Introduction To Java
164 pages
CS8392 OOPS 5 Units Notes PDF
PDF
0% (1)
CS8392 OOPS 5 Units Notes PDF
174 pages
CS8392 Oop Unit 1 Notes
PDF
No ratings yet
CS8392 Oop Unit 1 Notes
58 pages
Java semester 2 full notes
PDF
No ratings yet
Java semester 2 full notes
49 pages
Java Notes (Class)
PDF
No ratings yet
Java Notes (Class)
163 pages
Iii Sem Java Unit-1
PDF
No ratings yet
Iii Sem Java Unit-1
26 pages
Lec1 Introduction
PDF
No ratings yet
Lec1 Introduction
51 pages
(JNTUA-R19) : Ii B.Tech I Semester
PDF
No ratings yet
(JNTUA-R19) : Ii B.Tech I Semester
220 pages
Introduction
PDF
No ratings yet
Introduction
70 pages
Unit1 Introduction
PDF
No ratings yet
Unit1 Introduction
79 pages
Java Complete Material New
PDF
No ratings yet
Java Complete Material New
129 pages
Java Notes-Ii CS
PDF
No ratings yet
Java Notes-Ii CS
265 pages
Unit-1 Java (Nep)
PDF
No ratings yet
Unit-1 Java (Nep)
47 pages
MCA OOPJ Unit-1 Material
PDF
No ratings yet
MCA OOPJ Unit-1 Material
88 pages
Java Mod1 Part1
PDF
No ratings yet
Java Mod1 Part1
80 pages
Object Oriented Paradigm:: Compiled By: Er. R. K. Gupta
PDF
No ratings yet
Object Oriented Paradigm:: Compiled By: Er. R. K. Gupta
88 pages
Chapter 1
PDF
No ratings yet
Chapter 1
37 pages
Java Material
PDF
No ratings yet
Java Material
89 pages
Unit IV
PDF
No ratings yet
Unit IV
63 pages
Java Programming Notes
PDF
100% (1)
Java Programming Notes
236 pages
CMP 301 Object Oriented Programming Langauage I
PDF
No ratings yet
CMP 301 Object Oriented Programming Langauage I
65 pages
Java Learn Java in 3 Days! (David Chang - Programming)
PDF
No ratings yet
Java Learn Java in 3 Days! (David Chang - Programming)
77 pages
CS8392 OBJECT ORIENTED PROGRAMMING Unit1
PDF
No ratings yet
CS8392 OBJECT ORIENTED PROGRAMMING Unit1
221 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
Java Complete Notes
PDF
Java Complete Notes
Shorted OOPs
PDF
Shorted OOPs
Java Programming Notes 4 128
PDF
Java Programming Notes 4 128
EIT CSE Notes
PDF
EIT CSE Notes
Java 4
PDF
Java 4
STUDENT JAVA PROGRAMMING NOTE ORIGINAL
PDF
STUDENT JAVA PROGRAMMING NOTE ORIGINAL
Java 3
PDF
Java 3
319 Cse Second Year Corrected Text Book
PDF
319 Cse Second Year Corrected Text Book
Yy60
PDF
Yy60
Unit 1 - OOPs Java
PDF
Unit 1 - OOPs Java
Java Programming
PDF
Java Programming
JAVA PROGRAMMING_NOTES
PDF
JAVA PROGRAMMING_NOTES
Object-Oriented Proramming: By: Nesredin A. (BSC, MSC)
PDF
Object-Oriented Proramming: By: Nesredin A. (BSC, MSC)
Oops Through Java Btech 3rd Year Notes
PDF
Oops Through Java Btech 3rd Year Notes
Unit - 1
PDF
Unit - 1
Unit-wisNotes_java1
PDF
Unit-wisNotes_java1
Java Notes
PDF
Java Notes
Java 1
PDF
Java 1
CS3391-Object Oriented Programming - by WWW - LearnEngineering.in
PDF
CS3391-Object Oriented Programming - by WWW - LearnEngineering.in
Cs3391 Oops Unit 1 Notes Eduengg
PDF
Cs3391 Oops Unit 1 Notes Eduengg
Module1 New
PDF
Module1 New
Oops Java
PDF
Oops Java
JAVA UNIT-1 Notes
PDF
JAVA UNIT-1 Notes
Module 1
PDF
Module 1
Introduction To Object Oriented Programming: by Megha V Gupta, NHITM
PDF
Introduction To Object Oriented Programming: by Megha V Gupta, NHITM
18BCS43C U1
PDF
18BCS43C U1
Important Notes On JAVA
PDF
Important Notes On JAVA
20201223-Java Programming
PDF
20201223-Java Programming
Java Notes
PDF
Java Notes
Unit 1
PDF
Unit 1
1.java Programming Unit 1
PDF
1.java Programming Unit 1
UNIT-1Introduction to java programming-Features of Java Language-JVM -The Java Environment- Fundamental Programming Structures in Java – Comments
PDF
UNIT-1Introduction to java programming-Features of Java Language-JVM -The Java Environment- Fundamental Programming Structures in Java – Comments
Java First Unit
PDF
Java First Unit
Ii Bca Java
PDF
Ii Bca Java
Unit-I Introduction To Java
PDF
Unit-I Introduction To Java
CS8392 OOPS 5 Units Notes PDF
PDF
CS8392 OOPS 5 Units Notes PDF
CS8392 Oop Unit 1 Notes
PDF
CS8392 Oop Unit 1 Notes
Java semester 2 full notes
PDF
Java semester 2 full notes
Java Notes (Class)
PDF
Java Notes (Class)
Iii Sem Java Unit-1
PDF
Iii Sem Java Unit-1
Lec1 Introduction
PDF
Lec1 Introduction
(JNTUA-R19) : Ii B.Tech I Semester
PDF
(JNTUA-R19) : Ii B.Tech I Semester
Introduction
PDF
Introduction
Unit1 Introduction
PDF
Unit1 Introduction
Java Complete Material New
PDF
Java Complete Material New
Java Notes-Ii CS
PDF
Java Notes-Ii CS
Unit-1 Java (Nep)
PDF
Unit-1 Java (Nep)
MCA OOPJ Unit-1 Material
PDF
MCA OOPJ Unit-1 Material
Java Mod1 Part1
PDF
Java Mod1 Part1
Object Oriented Paradigm:: Compiled By: Er. R. K. Gupta
PDF
Object Oriented Paradigm:: Compiled By: Er. R. K. Gupta
Chapter 1
PDF
Chapter 1
Java Material
PDF
Java Material
Unit IV
PDF
Unit IV
Java Programming Notes
PDF
Java Programming Notes
CMP 301 Object Oriented Programming Langauage I
PDF
CMP 301 Object Oriented Programming Langauage I
Java Learn Java in 3 Days! (David Chang - Programming)
PDF
Java Learn Java in 3 Days! (David Chang - Programming)
CS8392 OBJECT ORIENTED PROGRAMMING Unit1
PDF
CS8392 OBJECT ORIENTED PROGRAMMING Unit1