SlideShare a Scribd company logo
1 of 7
WRITING YOUR FIRST JAVA
PROGRAM
This tutorial does NOT tell you how to install
the required tools for your computer. To
install these resources, use a Youtube video
Setting up your project
LOREM IPSUM DOLOR SIT AMET,
CONSECTETUER ADIPISCING ELIT.
NUNC VIVERRA IMPERDIET ENIM.
FUSCE EST. VIVAMUS A TELLUS.
PELLENTESQUE HABITANT MORBI
TRISTIQUE SENECTUS ET NETUS.
Setting up your project (2)
Things to note:
1.Name project HelloWorld
2.Create package inside of the src folder
3.Name that package Main
4.Create class HelloWorld
Your first
programs outline
This is the outline of your
program. The class is an outline
of your program. A class is
necessary for object-oriented
programming, which we will
cover soon. All code (beside
imports) will have to be in a
class.
Main Method
To get technical, the main method
is complex, and the meaning isn’t
very important unless you are
doing low level programming. The
method must look like this and
should not be changed. Although,
many of the keywords have
meaning and we will learn about
them soon. I know I keep saying
soon, but it takes time to learn
these skills.
Imagine the main method as the seats in your class. Students that are working sit
at their desk
Printing Text
1. System tells Java to set up its system controls
2. Out tells Java to display
3. Println is the function for displaying. It displays in the eclipse
consol.
4. Everything within the parenthesis are used for printing
5. The semicolon (Thing after parenthesis) is like a period at the end
of a sentence.
You can also use print instead of
println. Println puts a line after
the text is printed, so if you are
printing a lot of text, its not all
on the same line.
Also note that text must be in
quotations, unless your printing a
variable. This goes inside the main
method.
The End
Now I want you to try to write a
program with the following
requirements:
1. Only Uses the Print function.
(NOT Println)
2. Has spaces between lines
(Like Println)
3.Contains a backslash
After you do that then fill out
the forum on the left. These will
help you out later in this course
This forum will help with the project on the left

More Related Content

What's hot

Improve your web and app development with the Symfony3 framework.
Improve your web and app development with the Symfony3 framework.Improve your web and app development with the Symfony3 framework.
Improve your web and app development with the Symfony3 framework.Polcode
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingMa Ella Masilungan
 
Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'Dror Helper
 
programming type error
programming type errorprogramming type error
programming type errorWalepak Ubi
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
Python for Beginners - How to Learn Python Easily
Python for Beginners - How to Learn Python EasilyPython for Beginners - How to Learn Python Easily
Python for Beginners - How to Learn Python EasilyCorey McCreary
 
‫سيناريو الفيديو نسخة
‫سيناريو الفيديو   نسخة‫سيناريو الفيديو   نسخة
‫سيناريو الفيديو نسخةDalal70
 

What's hot (9)

SAP OSS note search
SAP OSS note searchSAP OSS note search
SAP OSS note search
 
Improve your web and app development with the Symfony3 framework.
Improve your web and app development with the Symfony3 framework.Improve your web and app development with the Symfony3 framework.
Improve your web and app development with the Symfony3 framework.
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'Debugging with visual studio beyond 'F5'
Debugging with visual studio beyond 'F5'
 
programming type error
programming type errorprogramming type error
programming type error
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
Python for Beginners - How to Learn Python Easily
Python for Beginners - How to Learn Python EasilyPython for Beginners - How to Learn Python Easily
Python for Beginners - How to Learn Python Easily
 
‫سيناريو الفيديو نسخة
‫سيناريو الفيديو   نسخة‫سيناريو الفيديو   نسخة
‫سيناريو الفيديو نسخة
 
Ben pa
Ben paBen pa
Ben pa
 

Similar to Java

Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Mohamed Essam
 
Programming in Java: Getting Started
Programming in Java: Getting StartedProgramming in Java: Getting Started
Programming in Java: Getting StartedMartin Chapman
 
lecture2-PerlProgramming
lecture2-PerlProgramminglecture2-PerlProgramming
lecture2-PerlProgrammingtutorialsruby
 
lecture2-PerlProgramming
lecture2-PerlProgramminglecture2-PerlProgramming
lecture2-PerlProgrammingtutorialsruby
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manualnahalomar
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicAn I
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicSara Samol
 
Struktur Level Program
Struktur Level ProgramStruktur Level Program
Struktur Level ProgramDimara Hakim
 
Computer Science 111 Computer Science I with Java and Pyth.docx
Computer Science 111 Computer Science I with Java and Pyth.docxComputer Science 111 Computer Science I with Java and Pyth.docx
Computer Science 111 Computer Science I with Java and Pyth.docxmccormicknadine86
 

Similar to Java (20)

Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Intro to programing with java-lecture 1
Intro to programing with java-lecture 1
 
How java works
How java worksHow java works
How java works
 
How java works
How java worksHow java works
How java works
 
Programming in Java: Getting Started
Programming in Java: Getting StartedProgramming in Java: Getting Started
Programming in Java: Getting Started
 
Moreno Xec
Moreno XecMoreno Xec
Moreno Xec
 
lecture2-PerlProgramming
lecture2-PerlProgramminglecture2-PerlProgramming
lecture2-PerlProgramming
 
lecture2-PerlProgramming
lecture2-PerlProgramminglecture2-PerlProgramming
lecture2-PerlProgramming
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
Database Management Assignment Help
Database Management Assignment Help Database Management Assignment Help
Database Management Assignment Help
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Python3handson
Python3handsonPython3handson
Python3handson
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
Class 1
Class 1Class 1
Class 1
 
Class 1
Class 1Class 1
Class 1
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
 
Struktur Level Program
Struktur Level ProgramStruktur Level Program
Struktur Level Program
 
Notes
NotesNotes
Notes
 
Computer Science 111 Computer Science I with Java and Pyth.docx
Computer Science 111 Computer Science I with Java and Pyth.docxComputer Science 111 Computer Science I with Java and Pyth.docx
Computer Science 111 Computer Science I with Java and Pyth.docx
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Java

  • 1. WRITING YOUR FIRST JAVA PROGRAM This tutorial does NOT tell you how to install the required tools for your computer. To install these resources, use a Youtube video
  • 2. Setting up your project LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. NUNC VIVERRA IMPERDIET ENIM. FUSCE EST. VIVAMUS A TELLUS. PELLENTESQUE HABITANT MORBI TRISTIQUE SENECTUS ET NETUS.
  • 3. Setting up your project (2) Things to note: 1.Name project HelloWorld 2.Create package inside of the src folder 3.Name that package Main 4.Create class HelloWorld
  • 4. Your first programs outline This is the outline of your program. The class is an outline of your program. A class is necessary for object-oriented programming, which we will cover soon. All code (beside imports) will have to be in a class.
  • 5. Main Method To get technical, the main method is complex, and the meaning isn’t very important unless you are doing low level programming. The method must look like this and should not be changed. Although, many of the keywords have meaning and we will learn about them soon. I know I keep saying soon, but it takes time to learn these skills. Imagine the main method as the seats in your class. Students that are working sit at their desk
  • 6. Printing Text 1. System tells Java to set up its system controls 2. Out tells Java to display 3. Println is the function for displaying. It displays in the eclipse consol. 4. Everything within the parenthesis are used for printing 5. The semicolon (Thing after parenthesis) is like a period at the end of a sentence. You can also use print instead of println. Println puts a line after the text is printed, so if you are printing a lot of text, its not all on the same line. Also note that text must be in quotations, unless your printing a variable. This goes inside the main method.
  • 7. The End Now I want you to try to write a program with the following requirements: 1. Only Uses the Print function. (NOT Println) 2. Has spaces between lines (Like Println) 3.Contains a backslash After you do that then fill out the forum on the left. These will help you out later in this course This forum will help with the project on the left