SlideShare una empresa de Scribd logo
1 de 16
JECRC
FOUNDATION
INDUSTRIAL TRAINING ON
JAVA CORE PROGRAMMING LANGUAGE
PRESENTED BY :
NAME = Pranav Soni
RTU ROLL NO. = 21EJCCS172
BRANCH/SEMESTER/SECTION = Computer Science Engineering
/ Third Semester / C-2
SUBMITTED TO :
Mr. Sunil Sharma
Industrial Training Coordinator
(CSE Department)
Dr. Sanjay Gaur
(HOD CSE Department)
TOPICS :
• Brief intro to Java
• Develop and compile environment
• A simple example
• Intro to object/class
• Java basics
• Differences from C
INRO TO JAVA CORE PROGRAMMING :
• Java programming language
• The one we use to write our program
• Compiled to byte code of JVM
• Java virtual machine (JVM)
• Java interpreter – interpret the compiled byte code
• Software simulated CPU architecture
• Cross-platform: support Linux, Windows, etc.
• Java runtime environment (JRE)
• Predefined set of java classes available to use
• Core Java APIs – basic utilities, I/O, graphics, network
Java is portable :
• As long as there is a JVM compiled for that particular processor and OS
• Typical program, like C or C++, is compiled for a particular processor architecture and OS.
• “Write once, run everywhere!”
• Sun’s motto for Java
JAVA :
• java is an object-oriented language, with a syntax similar to C
• Structured around objects and methods
• A method is an action or something you do with the object
• Avoid those overly complicated features of C++:
• Operator overloading, pointer, templates, friend class, etc.
Getting and using java :
• J2SDK freely download from http://java.sun.com
• detailed instructions to help you run your first program :
• http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
• All text editors support java
• Vi/vim, emacs, notepad, word pad
• Just save to .java file
• Have IDEs that comparable to Visual Studio
• J Creator (simple)
• Eclipse (more complicated)
Compile and run an application :
• Write java class Foo containing a main() method and save in file “Foo.java”
• The file name MUST be the same as class name
• Compile with: javac Foo.java
• Creates compiled .class file: Foo.class
• Run the program: java Foo
• Notice: use the class name directly, no .class!
Hello World!
• /* Our first Java program – Hello.java */
• public class Hello {
• //main()
• public static void main ( String[] args )
• {
• System.out.println( "hello world!" );
• }
• }
File name: Hello.java
About class :
Fundamental unit of Java program =
• All java programs are classes
• Each class define a unique kind of object ( a new data type)
• Each class defines a set of fields, methods or other classes
• public: modifier. This class is publicly available and anyone can use it.
Things to notice :
• Java is case sensitive
• whitespace doesn’t matter for compilation
• File name must be the same as one of the class names, including capitalization!
• At most one public class per file
• If there is one public class in the file, the filename must be the same as it
• Generally one class per file
What is an object ?
• Object is a thing
• An object has state, behavior and identity
• Internal variable: store state
• Method: produce behavior
• Unique address in memory: identity
• An object is a manifestation of a class
What is class ?
• Class introduces a new data type
• A class describes a set of objects that have identical characteristics (data elements) and behaviors (methods).
• Existing classes provided by JRE
• User defined classes
• Once a class is established, you can make as many objects of it as you like, or none.
Simple example: class Person
• A Person has some attributes
• The class defines these properties for all people
• Each person gets his own copy of the fields
• Attributes = properties = fields
class ClassName{ /* class body goes here */ }
class: keyword
• class Person
• {
• String name;
• int height; //in inches
• int weight; //in pounds
• public void printInfo()
• {
• System.out.println(name+" with height="+height+", weight="+weight);
• }
• }
Class Person: definition
Presentation 1.pptx
Presentation 1.pptx

Más contenido relacionado

Similar a Presentation 1.pptx (20)

Java01
Java01Java01
Java01
 
Introduction what is java
Introduction what is javaIntroduction what is java
Introduction what is java
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
Java Course — Mastering the Fundamentals
Java Course — Mastering the FundamentalsJava Course — Mastering the Fundamentals
Java Course — Mastering the Fundamentals
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 
java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbai
 
java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbai
 
Java
JavaJava
Java
 
java01.pdf
java01.pdfjava01.pdf
java01.pdf
 
Java
JavaJava
Java
 
Java01
Java01Java01
Java01
 
Java intro
Java introJava intro
Java intro
 
Java01
Java01Java01
Java01
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
 
mukul Dubey.pptx
mukul Dubey.pptxmukul Dubey.pptx
mukul Dubey.pptx
 

Último

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Último (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

Presentation 1.pptx

  • 1. JECRC FOUNDATION INDUSTRIAL TRAINING ON JAVA CORE PROGRAMMING LANGUAGE PRESENTED BY : NAME = Pranav Soni RTU ROLL NO. = 21EJCCS172 BRANCH/SEMESTER/SECTION = Computer Science Engineering / Third Semester / C-2 SUBMITTED TO : Mr. Sunil Sharma Industrial Training Coordinator (CSE Department) Dr. Sanjay Gaur (HOD CSE Department)
  • 2. TOPICS : • Brief intro to Java • Develop and compile environment • A simple example • Intro to object/class • Java basics • Differences from C
  • 3. INRO TO JAVA CORE PROGRAMMING : • Java programming language • The one we use to write our program • Compiled to byte code of JVM • Java virtual machine (JVM) • Java interpreter – interpret the compiled byte code • Software simulated CPU architecture • Cross-platform: support Linux, Windows, etc. • Java runtime environment (JRE) • Predefined set of java classes available to use • Core Java APIs – basic utilities, I/O, graphics, network
  • 4. Java is portable : • As long as there is a JVM compiled for that particular processor and OS • Typical program, like C or C++, is compiled for a particular processor architecture and OS. • “Write once, run everywhere!” • Sun’s motto for Java
  • 5. JAVA : • java is an object-oriented language, with a syntax similar to C • Structured around objects and methods • A method is an action or something you do with the object • Avoid those overly complicated features of C++: • Operator overloading, pointer, templates, friend class, etc.
  • 6. Getting and using java : • J2SDK freely download from http://java.sun.com • detailed instructions to help you run your first program : • http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html • All text editors support java • Vi/vim, emacs, notepad, word pad • Just save to .java file • Have IDEs that comparable to Visual Studio • J Creator (simple) • Eclipse (more complicated)
  • 7. Compile and run an application : • Write java class Foo containing a main() method and save in file “Foo.java” • The file name MUST be the same as class name • Compile with: javac Foo.java • Creates compiled .class file: Foo.class • Run the program: java Foo • Notice: use the class name directly, no .class!
  • 8. Hello World! • /* Our first Java program – Hello.java */ • public class Hello { • //main() • public static void main ( String[] args ) • { • System.out.println( "hello world!" ); • } • } File name: Hello.java
  • 9. About class : Fundamental unit of Java program = • All java programs are classes • Each class define a unique kind of object ( a new data type) • Each class defines a set of fields, methods or other classes • public: modifier. This class is publicly available and anyone can use it.
  • 10. Things to notice : • Java is case sensitive • whitespace doesn’t matter for compilation • File name must be the same as one of the class names, including capitalization! • At most one public class per file • If there is one public class in the file, the filename must be the same as it • Generally one class per file
  • 11. What is an object ? • Object is a thing • An object has state, behavior and identity • Internal variable: store state • Method: produce behavior • Unique address in memory: identity • An object is a manifestation of a class
  • 12. What is class ? • Class introduces a new data type • A class describes a set of objects that have identical characteristics (data elements) and behaviors (methods). • Existing classes provided by JRE • User defined classes • Once a class is established, you can make as many objects of it as you like, or none.
  • 13. Simple example: class Person • A Person has some attributes • The class defines these properties for all people • Each person gets his own copy of the fields • Attributes = properties = fields
  • 14. class ClassName{ /* class body goes here */ } class: keyword • class Person • { • String name; • int height; //in inches • int weight; //in pounds • public void printInfo() • { • System.out.println(name+" with height="+height+", weight="+weight); • } • } Class Person: definition