SlideShare a Scribd company logo
Welcome to vibrant technologies
and computers
Content:
• Present the syntax of Java
• Introduce the Java API
• Demonstrate how to build
– stand-alone Java programs
– Java applets, which run within browsers e.g.
Netscape
• Example programs
Why Java?
• It’s the current “hot” language
• It’s almost entirely object-oriented
• It has a vast library of predefined objects
and operations
• It’s more platform independent
– this makes it great for Web programming
• It’s more secure
• It isn’t C++
Applets, Servlets and
Applications
• An applet is designed to be embedded in a
Web page, and run by a browser
• Applets run in a sandbox with numerous
restrictions; for example, they can’t read
files and then use the network
• A servlet is designed to be run by a web
server
• An application is a conventional program
Building Standalone JAVA
Programs (on UNIX)
• Prepare the file foo.java using an editor
• Invoke the compiler: javac foo.java
• This creates foo.class
• Run the java interpreter: java foo
Java Virtual Machine
• The .class files generated by the compiler are
not executable binaries
– so Java combines compilation and interpretation
• Instead, they contain “byte-codes” to be
executed by the Java Virtual Machine
– other languages have done this, e.g. UCSD Pascal
• This approach provides platform
independence, and greater security
HelloWorld (standalone)
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
• Note that String is built in
• println is a member function for the
System.out class
Comments are almost like C++
• /* This kind of comment can span multiple lines
*/
• // This kind is to the end of the line
• /**
* This kind of comment is a special
* ‘javadoc’ style comment
*/
Primitive data types are like C
• Main data types are int, double,
boolean, char
• Also have byte, short, long, float
• boolean has values true and false
• Declarations look like C, for example,
– double x, y;
– int count = 0;
Expressions are like C
• Assignment statements mostly look like those in C; you
can use =, +=, *= etc.
• Arithmetic uses the familiar + - * / %
• Java also has ++ and --
• Java has boolean operators && || !
• Java has comparisons < <= == != >= >
• Java does not have pointers or pointer arithmetic
Control statements are like C
• if (x < y) smaller = x;
• if (x < y){ smaller=x;sum += x;}
else { smaller = y; sum += y; }
• while (x < y) { y = y - x; }
• do { y = y - x; } while (x < y)
• for (int i = 0; i < max; i++)
sum += i;
• BUT: conditions must be boolean !
Control statements II
• Java also introduces the try statement,
about which more later
switch (n + 1) {
case 0: m = n - 1; break;
case 1: m = n + 1;
case 3: m = m * n; break;
default: m = -n; break;
}
Java isn't C!
• In C, almost everything is in functions
• In Java, almost everything is in classes
• There is often only one class per file
• There must be only one public class per file
• The file name must be the same as the name
of that public class, but with a .java
extension
Java program layout
• A typical Java file looks like:
import java.awt.*;
import java.util.*;
public class SomethingOrOther {
// object definitions go here
. . .
}
This must be in a file named SomethingOrOther.java !
What is a class?
• Early languages had only arrays
– all elements had to be of the same type
• Then languages introduced structures (called
records, or structs)
– allowed different data types to be grouped
• Then Abstract Data Types (ADTs) became
popular
– grouped operations along with the data
So, what is a class?
• A class consists of
– a collection of fields, or variables, very much
like the named fields of a struct
– all the operations (called methods) that can be
performed on those fields
– can be instantiated
• A class describes objects and operations
defined on those objects
Name conventions
• Java is case-sensitive; maxval, maxVal, and
MaxVal are three different names
• Class names begin with a capital letter
• All other names begin with a lowercase letter
• Subsequent words are capitalized: theBigOne
• Underscores are not used in names
• These are very strong conventions!
The class hierarchy
• Classes are arranged in a hierarchy
• The root, or topmost, class is Object
• Every class but Object has at least one
superclass
• A class may have subclasses
• Each class inherits all the fields and methods
of its (possibly numerous) superclasses
An example of a class
class Person {
String name;
int age;
void birthday ( ) {
age++;
System.out.println (name + ' is
now ' + age);
}
}
Another example of a class
class Driver extends Person {
long driversLicenseNumber;
Date expirationDate;
}
Creating and using an object
• Person john;
john = new Person ( );
john.name = "John Smith";
john.age = 37;
• Person mary = new Person ( );
mary.name = "Mary Brown";
mary.age = 33;
mary.birthday ( );
An array is an object
• Person mary = new Person ( );
• int myArray[ ] = new int[5];
– or:
• int myArray[ ] = {1, 4, 9, 16,
25};
• String languages [ ] =
{"Prolog", "Java"};
java-corporate-training-institute-in-mumbai

More Related Content

What's hot

Sep 15
Sep 15Sep 15
Sep 15
Zia Akbar
 
Sep 15
Sep 15Sep 15
Sep 15
dilipseervi
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
AbhishekMondal42
 
Java principles
Java principlesJava principles
Java principles
Adel Jaffan
 
C Sharp Course 101.5
C Sharp Course 101.5C Sharp Course 101.5
C Sharp Course 101.5
Shahed Chowdhuri
 
introduction to c #
introduction to c #introduction to c #
introduction to c #
Sireesh K
 
Java 102 intro to object-oriented programming in java
Java 102   intro to object-oriented programming in javaJava 102   intro to object-oriented programming in java
Java 102 intro to object-oriented programming in java
agorolabs
 
Java for the Beginners
Java for the BeginnersJava for the Beginners
Java for the Beginners
Biswadip Goswami
 
Java Tutorial Lab 1
Java Tutorial Lab 1Java Tutorial Lab 1
Java Tutorial Lab 1
Berk Soysal
 
core java programming
core java programmingcore java programming
core java programming
Annu Raj
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
Basuk
 
Javasession6
Javasession6Javasession6
Javasession6
Rajeev Kumar
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
agorolabs
 
Java- Nested Classes
Java- Nested ClassesJava- Nested Classes
Java- Nested Classes
Prabhdeep Singh
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Rahul Jain
 

What's hot (15)

Sep 15
Sep 15Sep 15
Sep 15
 
Sep 15
Sep 15Sep 15
Sep 15
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java principles
Java principlesJava principles
Java principles
 
C Sharp Course 101.5
C Sharp Course 101.5C Sharp Course 101.5
C Sharp Course 101.5
 
introduction to c #
introduction to c #introduction to c #
introduction to c #
 
Java 102 intro to object-oriented programming in java
Java 102   intro to object-oriented programming in javaJava 102   intro to object-oriented programming in java
Java 102 intro to object-oriented programming in java
 
Java for the Beginners
Java for the BeginnersJava for the Beginners
Java for the Beginners
 
Java Tutorial Lab 1
Java Tutorial Lab 1Java Tutorial Lab 1
Java Tutorial Lab 1
 
core java programming
core java programmingcore java programming
core java programming
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
 
Javasession6
Javasession6Javasession6
Javasession6
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
 
Java- Nested Classes
Java- Nested ClassesJava- Nested Classes
Java- Nested Classes
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 

Viewers also liked

Kndgn fail induk pgkp
Kndgn fail induk pgkpKndgn fail induk pgkp
Kndgn fail induk pgkp
Normisah Saiman
 
Surat keterangan domisili penduduk
Surat keterangan domisili pendudukSurat keterangan domisili penduduk
Surat keterangan domisili penduduk
asimamaludin9
 
Química ambiental aire
Química ambiental aireQuímica ambiental aire
Química ambiental aire
Janina Guillen Rodriguez
 
New amendments to Cyprus Tax Legislation
New amendments to Cyprus Tax LegislationNew amendments to Cyprus Tax Legislation
New amendments to Cyprus Tax Legislation
Eurofast
 
Heta liitto 21.10.2015
Heta liitto 21.10.2015Heta liitto 21.10.2015
Heta liitto 21.10.2015
Samuli Sukkula
 
Determination of ground water potential by resistivity method
Determination of ground water potential by resistivity methodDetermination of ground water potential by resistivity method
Determination of ground water potential by resistivity method
zeeshan Ahmad
 
Ronaldo Reacts Angrily To UEFA Drug Test Request
Ronaldo Reacts Angrily To UEFA Drug Test RequestRonaldo Reacts Angrily To UEFA Drug Test Request
Ronaldo Reacts Angrily To UEFA Drug Test Request
isteroidscom
 
Cards mobile presentation
Cards mobile presentationCards mobile presentation
Cards mobile presentation
finnopolis
 
The danube waterway economic geography (Via Donau)
The danube waterway economic geography (Via Donau)The danube waterway economic geography (Via Donau)
The danube waterway economic geography (Via Donau)
ARVD - Waterborne Transport Development Agency
 
List of Best MBA Dissertation Topics
List of Best MBA Dissertation TopicsList of Best MBA Dissertation Topics
List of Best MBA Dissertation Topics
mbathesis01
 
RELIGIOUS BELIEFS & SCIENCE
RELIGIOUS BELIEFS & SCIENCERELIGIOUS BELIEFS & SCIENCE
RELIGIOUS BELIEFS & SCIENCE
Sahil Goel
 
Research Framework for the Cape Town Stadium V3
Research Framework for the Cape Town Stadium V3Research Framework for the Cape Town Stadium V3
Research Framework for the Cape Town Stadium V3
Roslyn Bristow
 
Bagian Bagian Mata
Bagian Bagian MataBagian Bagian Mata
Bagian Bagian Mata
fkhansabyl_
 
IPA KELAS 9 REPRODUKSI WANITA
IPA KELAS 9 REPRODUKSI WANITAIPA KELAS 9 REPRODUKSI WANITA
IPA KELAS 9 REPRODUKSI WANITA
ajengkartika123
 

Viewers also liked (14)

Kndgn fail induk pgkp
Kndgn fail induk pgkpKndgn fail induk pgkp
Kndgn fail induk pgkp
 
Surat keterangan domisili penduduk
Surat keterangan domisili pendudukSurat keterangan domisili penduduk
Surat keterangan domisili penduduk
 
Química ambiental aire
Química ambiental aireQuímica ambiental aire
Química ambiental aire
 
New amendments to Cyprus Tax Legislation
New amendments to Cyprus Tax LegislationNew amendments to Cyprus Tax Legislation
New amendments to Cyprus Tax Legislation
 
Heta liitto 21.10.2015
Heta liitto 21.10.2015Heta liitto 21.10.2015
Heta liitto 21.10.2015
 
Determination of ground water potential by resistivity method
Determination of ground water potential by resistivity methodDetermination of ground water potential by resistivity method
Determination of ground water potential by resistivity method
 
Ronaldo Reacts Angrily To UEFA Drug Test Request
Ronaldo Reacts Angrily To UEFA Drug Test RequestRonaldo Reacts Angrily To UEFA Drug Test Request
Ronaldo Reacts Angrily To UEFA Drug Test Request
 
Cards mobile presentation
Cards mobile presentationCards mobile presentation
Cards mobile presentation
 
The danube waterway economic geography (Via Donau)
The danube waterway economic geography (Via Donau)The danube waterway economic geography (Via Donau)
The danube waterway economic geography (Via Donau)
 
List of Best MBA Dissertation Topics
List of Best MBA Dissertation TopicsList of Best MBA Dissertation Topics
List of Best MBA Dissertation Topics
 
RELIGIOUS BELIEFS & SCIENCE
RELIGIOUS BELIEFS & SCIENCERELIGIOUS BELIEFS & SCIENCE
RELIGIOUS BELIEFS & SCIENCE
 
Research Framework for the Cape Town Stadium V3
Research Framework for the Cape Town Stadium V3Research Framework for the Cape Town Stadium V3
Research Framework for the Cape Town Stadium V3
 
Bagian Bagian Mata
Bagian Bagian MataBagian Bagian Mata
Bagian Bagian Mata
 
IPA KELAS 9 REPRODUKSI WANITA
IPA KELAS 9 REPRODUKSI WANITAIPA KELAS 9 REPRODUKSI WANITA
IPA KELAS 9 REPRODUKSI WANITA
 

Similar to java-corporate-training-institute-in-mumbai

java01.ppt
java01.pptjava01.ppt
java01.ppt
FakeBuddy2
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
ssuser73c6451
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
ShivamChaturvedi67
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
ROGNationYT
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
JyoGen
 
mukul Dubey.pptx
mukul Dubey.pptxmukul Dubey.pptx
mukul Dubey.pptx
CodeHome
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
SouravGhosh305827
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
SachinBhosale73
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
BabekEsedli
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
MENACE4
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
MansiDongare2
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
priyanshugautam46
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
archibhartiya
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
ximiha8972
 
java01.ppt
java01.pptjava01.ppt
java01.ppt
TarundeepSingh78
 
Java01
Java01Java01
Java01
Dhaval Patel
 
java01.pdf
java01.pdfjava01.pdf
java01.pdf
MadanMohanKushwah
 
Java01
Java01Java01
Java01
Java01Java01
Java01
Java01Java01

Similar to java-corporate-training-institute-in-mumbai (20)

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
 
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
 
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
Java01Java01
Java01
 
java01.pdf
java01.pdfjava01.pdf
java01.pdf
 
Java01
Java01Java01
Java01
 
Java01
Java01Java01
Java01
 
Java01
Java01Java01
Java01
 

Recently uploaded

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 

Recently uploaded (20)

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 

java-corporate-training-institute-in-mumbai

  • 1. Welcome to vibrant technologies and computers
  • 2.
  • 3. Content: • Present the syntax of Java • Introduce the Java API • Demonstrate how to build – stand-alone Java programs – Java applets, which run within browsers e.g. Netscape • Example programs
  • 4. Why Java? • It’s the current “hot” language • It’s almost entirely object-oriented • It has a vast library of predefined objects and operations • It’s more platform independent – this makes it great for Web programming • It’s more secure • It isn’t C++
  • 5. Applets, Servlets and Applications • An applet is designed to be embedded in a Web page, and run by a browser • Applets run in a sandbox with numerous restrictions; for example, they can’t read files and then use the network • A servlet is designed to be run by a web server • An application is a conventional program
  • 6. Building Standalone JAVA Programs (on UNIX) • Prepare the file foo.java using an editor • Invoke the compiler: javac foo.java • This creates foo.class • Run the java interpreter: java foo
  • 7. Java Virtual Machine • The .class files generated by the compiler are not executable binaries – so Java combines compilation and interpretation • Instead, they contain “byte-codes” to be executed by the Java Virtual Machine – other languages have done this, e.g. UCSD Pascal • This approach provides platform independence, and greater security
  • 8. HelloWorld (standalone) public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } • Note that String is built in • println is a member function for the System.out class
  • 9. Comments are almost like C++ • /* This kind of comment can span multiple lines */ • // This kind is to the end of the line • /** * This kind of comment is a special * ‘javadoc’ style comment */
  • 10. Primitive data types are like C • Main data types are int, double, boolean, char • Also have byte, short, long, float • boolean has values true and false • Declarations look like C, for example, – double x, y; – int count = 0;
  • 11. Expressions are like C • Assignment statements mostly look like those in C; you can use =, +=, *= etc. • Arithmetic uses the familiar + - * / % • Java also has ++ and -- • Java has boolean operators && || ! • Java has comparisons < <= == != >= > • Java does not have pointers or pointer arithmetic
  • 12. Control statements are like C • if (x < y) smaller = x; • if (x < y){ smaller=x;sum += x;} else { smaller = y; sum += y; } • while (x < y) { y = y - x; } • do { y = y - x; } while (x < y) • for (int i = 0; i < max; i++) sum += i; • BUT: conditions must be boolean !
  • 13. Control statements II • Java also introduces the try statement, about which more later switch (n + 1) { case 0: m = n - 1; break; case 1: m = n + 1; case 3: m = m * n; break; default: m = -n; break; }
  • 14. Java isn't C! • In C, almost everything is in functions • In Java, almost everything is in classes • There is often only one class per file • There must be only one public class per file • The file name must be the same as the name of that public class, but with a .java extension
  • 15. Java program layout • A typical Java file looks like: import java.awt.*; import java.util.*; public class SomethingOrOther { // object definitions go here . . . } This must be in a file named SomethingOrOther.java !
  • 16. What is a class? • Early languages had only arrays – all elements had to be of the same type • Then languages introduced structures (called records, or structs) – allowed different data types to be grouped • Then Abstract Data Types (ADTs) became popular – grouped operations along with the data
  • 17. So, what is a class? • A class consists of – a collection of fields, or variables, very much like the named fields of a struct – all the operations (called methods) that can be performed on those fields – can be instantiated • A class describes objects and operations defined on those objects
  • 18. Name conventions • Java is case-sensitive; maxval, maxVal, and MaxVal are three different names • Class names begin with a capital letter • All other names begin with a lowercase letter • Subsequent words are capitalized: theBigOne • Underscores are not used in names • These are very strong conventions!
  • 19. The class hierarchy • Classes are arranged in a hierarchy • The root, or topmost, class is Object • Every class but Object has at least one superclass • A class may have subclasses • Each class inherits all the fields and methods of its (possibly numerous) superclasses
  • 20. An example of a class class Person { String name; int age; void birthday ( ) { age++; System.out.println (name + ' is now ' + age); } }
  • 21. Another example of a class class Driver extends Person { long driversLicenseNumber; Date expirationDate; }
  • 22. Creating and using an object • Person john; john = new Person ( ); john.name = "John Smith"; john.age = 37; • Person mary = new Person ( ); mary.name = "Mary Brown"; mary.age = 33; mary.birthday ( );
  • 23. An array is an object • Person mary = new Person ( ); • int myArray[ ] = new int[5]; – or: • int myArray[ ] = {1, 4, 9, 16, 25}; • String languages [ ] = {"Prolog", "Java"};