Java Basics Flashcards
(43 cards)
What is it important to note with brackets?
For ever open bracket ( { [ …
There is a close bracket ) } ]
Write the skeleton/framework
import arc.*;
public class -name-{
public static void main(String [] args){
Console con = new Console();
} }
Location of Import Commands
top of the program
Function of Import Command
to import different programming libraries
What do Libraries give?
access to specific Java commands
to import different programming libraries
Function of Import Command
Write the import command for the arc library.
import arc.*;
Function of this command:
import arc.*:
imports the arc library
Function of this command:
public class javabasics2{
}
title of the java program
note: the title needs to match the saved file title exactly
Notes about the title:
no spaces
cannot start with a number
no special characters
What file extension name should you save your programs under?
.java
Function of this command:
public static void main(String[] args){
}
represents the main method of the java program
What do all Java programs have?
a public static void main
Function of this command:
Console con = new Console();
provides Console window
Function of Console window
number and text input
text or graphics output
Function of RAM Command
Tells RAM to reserves space for future data
Tells RAM to reserves space for future data
Function of RAM Command
number and text input
text or graphics output
Function of Console Window
Write the code which provides a console window.
Console con = new Console ();
Write the command which provides the main method of the program.
public static void main(String [] args){
}
Data type that holds integer data
int
int
data type that holds integer data
Function of GPU/Monitor Output Command
tells computer to print whatever is in quotes to the screen + data in variables
Write an example of GPU/Monitor Command
con.println(“example”);
or
con.print(“example”);
or
con.println(“example” + intVariable);