Introduction to Java programming - Java tutorial for beginners to teach Java basics in an easy and entertaining way
The document is an introduction to a Java programming course offered by Duckademy, aimed at teaching Java from basics to advanced concepts. It covers various topics, including data types, control structures, object-oriented programming, and software development tools, with practical exercises and projects. Additionally, it highlights the significance of Java in the job market and its widespread usage across various applications.
Introduction to the course, goal to become an expert Java developer. Covers getting started, exercises, and key topics. Details the course topics including OOP, algorithms, file handling, and the broad application of Java in various domains.
Requirements to start Java programming include JRE, IDEs (NetBeans, Eclipse), JDK, and JVM.
Explanation of Java variables and types, including primitive data types and objects with numerous examples.
Hands-on programming exercises on value replacement, temperature conversion, logical conditions, and structure control in Java.
End of Video 1 and preview of next video on control structures.
The goal ofthis course is to teach you how to
program in Java. From the very basics, through
lots of exercises, you will get to an advanced level
where you can become an expert Java developer.
4.
The course willcover
Getting started with Java Sorting elements in Java
Control structures Generics
NetBeans tips and tricks Variations for storing objects
Basic algorithms Handling exceptions
Arrays File handling
Functions and structured
programming
Enums
Object-oriented programming in
Java
Using external libraries in our
programs
Handling dates and times
5.
In this video
1.A quick intoduction to Java
2. Install NetBeans
3. Create our first project (Hello, World!)
4. Variables and types
5. Input/output and calculations
6. Conditions (if)
7. Review exercise
In theTOP 3 (if not the most popular)
3 billion devices run…
Platform independency (write
once, run anywhere)
Lots of well paying jobs
Wide usability
Java is popular
Basic computer skills
Programming
inJava
Basic
Java
tools
Mobile
apps
Android
Java ME
(cards, TV…)
Android has
the highest,
60% market
share among
mobile
platforms
worldwide.
13.
Basic computer skills
Programming
inJava
Basic
Java
tools
Mobile
apps
Desktop
apps
Android
Games
Java ME
(cards, TV…)
Software
tools
Scientific
research
14.
Basic computer skills
Programming
inJava
Basic
Java
tools
Mobile
apps
Desktop
apps
Enterprise
(”web”) apps
Android
Games
Java ME
(cards, TV…)
90% of
Fortune 500
companies
use Java.
Software
tools
Banks
Scientific
research
E-commerce
applications
Backend
services
15.
Basic computer skills
Programming
inJava
Basic
Java
tools
Mobile
apps
Desktop
apps
Enterprise
(”web”) apps
Android
Games
Java ME
(cards, TV…)
Software
tools
Programming
in Java
Banks
Scientific
research
E-commerce
applications
Backend
services
Basic
Java
tools
In this course
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
59.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer
60.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
61.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
Byte
62.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
ByteShort
63.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
ByteShort
Long
64.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
ByteShort
LongInt
65.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
ByteShort
LongInt
Float
66.
Java variables andtypes
All typesPrimitive types ClassesNumbers
Char
Boolean
Integer Real
Long
ByteShort Float
DoubleInt
67.
Replace the valueof 2 variables!
Don’t write numbers!
Don’t change the existing lines, only include new ones!
public class Replace {
public static void main(String[] args) {
int first = 7;
int second = 19;
// write something here!!!
System.out.println(”first=”+first+”
second=”+second);
}
}
Value replacing exercise
Temperature exercise
Writea program that reads in an integer value
denoting a temperature value in Celsius grade.
Calculate and print the Fahrenheit grade!
What do we not know?
– How to read in a number
– How to make calculations
°F =
9
5
°C + 32
78.
Boiling exercise
Writea program that reads in a temperature value
(in Celsius) and prints out if the water is boiling
at the specified temperature!
What do we not know?
– How to run a part of code based on a condition
100 °C
79.
Boiling and freezingexercise
Write a program that reads in a temperature value (in
Celsius), and prints out whether the water is boiling or
freezing or at normal state at the specified
temperature!
What do we not know?
– Joining if’s
0 °C 100 °C
Fighting exercise
Writea program with which you
can simulate one round of fight
between you and a monster.
First we read in the attributes
of each of you.
Then we play one round of the
fight.
Peter Tikos
96.
Fighting rules
Attributes:
AttackPoints (AP)
Defense Points (DP)
Damage (D)
Life Points (LP)
Fight (one round):
Attacker is chosen randomly (coin toss)
Attack Points + 2 Dice ? Enemy’s Defense Points
> : Attacker hits defender, so life points decreased by damage
<= : Miss
Let’s fight!
Firstlet’s generate random numbers!
Then we are ready to fight
99.
What’s next
Chooseone from many (switch)
Repeat it! (the loops)
– While
– Do-while
– For
Controlling loops
– Break
– Continue
Multiple loops one inside the other
www.duckademy.com/course/java-programming
Check out the course:
100.
End of video1
Next video:
Control structures
www.duckademy.com/course/java-programming
Check out the course: