Java Programming

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

class

declares the .java title.

without putting “Public” before it, you are not allowing other programs/files in the project to access it.

2
New cards

public static void main(String[] args) {}

Needed for programs like System.out.println(“Hello World!”);

3
New cards

System.out.println(“Hello World!”);

prints out “Hello World!” to the console.

4
New cards

Double variable = ;

Declares a double (number with decimals included) named variable that has a value of that amount.

5
New cards

int variable = ;

declares an integer (NO DECIMALS) variable named variable.

6
New cards

Boolean variable = ;

can only be true or false

7
New cards

import java.util.Scanner;

needed for user input.

8
New cards

scanner input = new Scanner(system.in);

create scanner object, needs to be declared before the use of input.

9
New cards

input.close();

closes the input scanner. This must be used after the scanner.

10
New cards

double userInput = input.nextDouble();

next input is set to that variable