Example Program
Example
Try running this program to see what it does.
Click continue to go to the next exercise.
Quick Docs
Variables
// Declare a variable
int myVarName;
// Initialize a variable
int myVarName = 5;
// Assign to an existing variable
myVarName = 10;
// A few types of data
int myInt = 5;
double myDouble = 9.9;
boolean myBoolean = true;
char myChar = 'a';
String myString = "Karel";
- Variables.java
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
8 Variables
Variables.java
1
2
public class Variables extends ConsoleProgram
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Docs
Example
More
History
Video
Download
About
W
This student is viewing this assignment in English. View this page in English?
This is an example for this lesson. You are encouraged to play around with it, run and change the code, and learn how it works. When you are done, click continue to go to the next problem.
Reset Code
Upload an image
Upload from your computer
Or paste a link here
Slides and Notes
No slides available for this video
About
Java (console)
Java Version 1.8.0_222