







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































Docsity.com
Docsity.com
String a = “a”;String b = “letter b”;a = “letter a”;String c = a + “ and “ + b;
Docsity.com
Symbols that perform simple computations Assignment: =Addition: +Subtraction:Multiplication: *Division: /
Docsity.com
finalPosition
= finalPosition +
initialVelocity * fallingTime;
finalPosition
= finalPosition + initialPosition;
OR
finalPosition
= initialVelocity * fallingTime;
finalPosition
= initialPosition;
Docsity.com
Docsity.com
Docsity.com
// x = 2.
double y = 3 / (2 + 1); // y = 1.
Docsity.com
int
a = 2;
// a = 2
double a = 2;
// a = 2.0 (Implicit)
int
a = 18.7;
int
a = (int)18.7;
// a = 18
double a = 2/3;
// a = 0.
double a = (double)2/3;
// a = 0.6666…
Docsity.com
Docsity.com
Docsity.com
class
NewLine
public static void
newLine
System
. out . println
} public static void
threeLines
newLine
newLine
newLine
} public static void
main
( String
arguments
System
. out . println
( "Line 1"
threeLines
System
. out . println
( "Line 2"
Docsity.com
public static void
main
( String
arguments
System
. out . println
( "Line 1"
threeLines
System
. out . println
( "Line 2"
public static void
threeLines
newLine
newLine
newLine
class
NewLine
public static void
newLine
System
. out . println
Docsity.com
Docsity.com