SlideShare a Scribd company logo
1 of 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

More Related Content

Similar to 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
 

Recently uploaded

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
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
 
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
 
(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
 
(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
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Recently uploaded (20)

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
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
 
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
 
(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
 
(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...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

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