Get Instant Access to eBook Empresas Headhunters Chile PDF at Our Huge Library
EMPRESAS HEADHUNTERS CHILE PDF ==> Download: EMPRESAS HEADHUNTERS CHIL
Story Transcript
BEGINNERS GUIDE TO JAVA PROGRAMMING
Dr. Marrynal S Eastaff Dr. V. Saravanan | Mrs. A. Gowri
Title
: BEGINNERS GUIDE TO JAVA PROGRAMMING
Author’s Name
: Dr. Marrynal S Eastaff Dr. V. Saravanan & Mrs. A. Gowri
Published by
: Shanlax Publications, Vasantha Nagar, Madurai – 625003, Tamil Nadu India
Publisher’s Address
: 61, 66 T.P.K. Main Road, Vasantha Nagar, Madurai – 625003, Tamil Nadu, India
Edition Details (I,II,III) : I ISBN
: 978-93-91373-84-9
Month & Year
: November, 2021
Copyright @
: Dr. Marrynal S Eastaff Dr. V. Saravanan & Mrs. A. Gowri
Pages
: 212
ACKNOWLEDGEMENT I wish to express my gratitude to my Lord Almighty and my family for having helped me in compiling this Book. I also wish to express my gratitude to the Management, CEO and Principal, Hindusthan College of Arts and Science for their constant support and encouragement. Dr. Marrynal S Eastaff Dr. V Saravanan Mrs. Gowri A
CONTENTS Chapter No. 1
Title Introduction to Object Oriented Programming 1. Introduction: 1.1 Object-Oriented Paradigm: 1.2 Basic Concepts of ObjectOriented Programming: 1.2.1 Objects and Classes 1.2.2 Data Abstraction and Encapsulation 1.2.3 Inheritance 1.2.4 Polymorphism 1.2.5 Dynamic Binding 1.2.6 Message Communication 1.3 Benefits of OOP 1.4 Applications of OOP 1.5 Java Features 1.5.1 Compiled and Interpreted 1.5.2 Platform Independence 1.5.3 Object Oriented 1.5.4 Robust 1.5.5 Security 1.5.6 Automatic Memory Management 1.5.7 Dynamic Binding 1.5.8 High Performance
1.5.9 Multithreaded 1.5.10 Some Features in C/C++ Eliminated 1.6 How Java Differs from C and C++ 1.6.1 Java and C 1.6.2 Java and C++ 1.7 Java and Internet 1.8 Java and World Wide Web 1.9 Java Environment 1.9.1 Java Development Kit (JDK) 1.9.2 Application Programming Interface 1.10 Overview of Java Language 1.10.1 Simple Java Program 1.11 Java Program Structure 1.11.1 Document Section 1.11.2 Package Statement 1.11.3 Import Statements 1.11.4 Interface Statements 1.11.5 Class Definitions 1.11.6 Main Method Class 1.12 Java Tokens 1.13 Java Character Set 1.13.1 Reserved Keywords 1.13.2 Identifiers 1.13.3 Literals 1.13.4 Operators
1.13.5 Separators 1.14 Java Statements 1.15 Implementing a Java Program 1.15.1 Creating the Program 1.15.2 Compiling the Program 1.15.3 Running the Program 1.15.4 Machine Neutral 1.16 Java Virtual Machine(JVM) Data Types, Operators and Expressions 2. Introduction 2.1 Constants 2.1.1 Integer constants 2.1.2 Real Constants 2.1.3 Single Character Constants 2.1.4 String Constants 2.1.5 Backslash Character Constant 2.2 Variables 2.2.1 Rules for writing variable names 2.3 Data Types 2.3.1 Integer types: 2.4 Floating point types: 2.4.1 float: 2.4.2 double: 2.5 char: 2.6 Boolean: 2.7 Declaration of Variables 2.8 Giving Values to Variables 2.9 Assignment Statement
Read Statement Operators and Expressions Arithmetic operators Relational Operators Logical Operators Assignment Operators Increment and Decrement Operators 2.11.6 Conditional Operator 2.11.7 Bitwise Operators 2.11.8 Special Operators 2.12 Evaluation of Expressions 2.13 Type Conversions in Expressions 2.13.1 Automatic Type Conversion 2.13.2 Casting a Value 2.13.3 Generic Type Casting 2.14 Operator Precedence and Associativity Decision Making and Looping Statements 3.1 Introduction 3.1.1 Decision Making with if Statement 3.1.2 The If...Else Statement 3.1.3 Nesting of If...Else statement 3.1.4 The Else..if Ladder 3.1.5 Switch Statement 3.2 Decision Making and Looping
3.2.1 The While Statement 3.2.2 The do Statement 3.2.3 The for Statement: 3.2.4 Nesting of for Loops 3.3 Jumps in Loops 3.3.1 Jumping out of a Loop Classes, Objects and Methods 4.1 Classes, Objects and Methods 4.2 Defining a class 4.2.1 Fields Declaration 4.2.2 Methods Declaration 4.3 Creating Objects 4.3.1 Accessing Class Members 4.4 Constructors 4.5 Method Overloading 4.6 Constructor Overloading 4.7 Static Members 4.7.1 Static Methods 4.8 Nesting of Methods Inheritance 5. Inheritance: Extending a Class 5.1 Defining a subclass 5.1.1 Subclass Constructor / Super Keyword 5.2 Types of Inheritance 5.2.1 Single Inheritancce 5.2.2 Multi-level Inheritance 5.2.3 Multiple Inheritance
Converting Numbers to Strings Using to String () Method 6.4.4 Converting String Objects to Numeric Objects using the Static Method Value of () 6.4.5 Converting Numeric Strings to Primitive Numbers Using Parsing Methods 6.5 Strings 6.5.1 String Methods 6.5.2 String Buffers Interface & Package 7. Interfaces 7.1 Defining an Interface 7.1.1 Extending Interfaces 7.1.2 Implementing Interfaces 7.2 Accessing Interface Variables 7.3 Packages: Putting Classes Together 7.4 Java API Packages 7.4.1 Using System Packages/Using Java API Packages 7.4.2 Creating Packages / User Defined Packages 7.4.3 Using a Package 7.5 Visibility and Access Rights in Java 7.6 Adding a Class to a Package 7.7 Hiding Classes
Threads in Java 8.1 Multithreaded Programming 8.2 Threads in Java 8.3 Creating Threads 8.3.1 Extending Thread class 8.3.2 Implementing Runnable Interface 8.4 Stopping and Blocking a Thread 8.5 Life Cycle of Thread 8.5.1 Thread Methods 8.6 Thread Priority 8.7 Synchronization Exception Handling & Applet Programming 9. Managing Errors and Exceptions 9.1 Types of Errors 9.2 Exceptions 9.3 Multiple Catch statements 9.4 Using Finally Statement 9.5 Throwing our Own Exception 9.6 Applet Programming 9.7 How Applets Differ from Applications 9.8 Applet Life Cycle 9.8.1 Initialization State: 9.8.2 Running state 9.8.3 Idle or Stopped state 9.8.4 Dead state 9.8.5 Display State 9.9 Creating an Executable Applet
9.10 Applet Tag 9.11 Passing Parameters to Applets 9.12 Getting Input from User 9.13 Graphics Programming 9.13.1 The Graphics Class 9.13.2 Lines and Rectangles 9.13.3 Circles and Ellipses 9.13.4 Drawing Arcs 9.13.5 Drawing Polygons Managing Files 10. Managing Input/Output Files in Java 10.1 Concept of Streams: 10.1.1 Stream Classes: 10.1.2 Byte Stream Classes 10.1.3 Character Stream Classes 10.2 Other useful I/O classes 10.2.1 Using the File Class 10.3 Creating a File
CHAPTER 1 Introduction to Object Oriented Programming 1
Introduction: Java is an object oriented language developed by Sun Microsystems. Around 1990 James Gosling, Bill Joy and others at Sun Microsystems began developing a language called Oak. Oak language was primarily developed to control microprocessors embedded in consumer items like PDA’s for this language should be a platform independent, reliable and compact language. But however due to the sudden explosion of Internet and similar technologies, Sun Microsystems changed their project objectives and renamed the Oak language into Java. In 1994 the project team developed a web browser called “HotJava” capable of locating and running applets, a java program that can run on a web browser.
1.1 Object-Oriented Paradigm: The major objective of object-oriented approach is to eliminate some of the flaws encountered in the procedural approach OOP treats data as a critical element in the program development and does not allow it to flow freely around the system. It ties data more closely to the functions that operate on it and protects it from unintentional modification by other functions. ISBN: 978-93-91373-84-9