Methods
Classes & Objects
String Manipulation
Misc.
AP Government
100
A method that performs a task but does not return a value

A void method

100

A blueprint from which objects are created in java.

What is a class

100

What is the length of this word: SkibbityRizz

12

100

Variables that cannot be changed have what infront

final

100

Name the 3 branches of Government

Legislative, Executive, Judicial
200

What is an instance method?

A method that is called on a specific instance (an object) of the class.

200

A single instance of a class

A object

200

What method checks to see if two strings have the exact same content?

equals()

200

The scope of the variable that only exist in the function is.

Local

200

The process of the Supreme Court ruling on a law or action being constitutional or not

Judicial Review

300

I have the private variable in a class: Length


Create a method that adds five minutes onto length(adds 5)

public void addFiveMinutes() {

length = length + 5;

}

300

Define State & Behavior

State are the instance variables

Methods are the behavior

300

What is the substring(1,4) of this word: SkibbityRizz

kib

300

How long was the government shut down?

43 days

300

How many members are in the Senate and HOR?

100 & 435

400

If I had a class called Timer and a method called startTime that prints out the starting time of a Timer. How would you print the start time of an object called laundry?

laundry.startTime();

400

Create 3 state variables for a Pineapple(String, boolean, double)

color, isRipe, weight

400

String forest = "Amazon Rainforest";
System.out.println(forest.indexOf('a')); System.out.println(forest.indexOf('g')); System.out.println(forest.indexOf('n'));

2

-1

5

400

Which of the following statements will not compile? You may assume any variable has been declared

I. “Tilly is ” + age + ” years old”
II. “My favorite letter is ” + “k”
III. greeting + name
IV. “Our team, ” + teamName + ” has ” + numPlayers

All will run

400

Name the 3 Presidents that have been impeached and why?

Nixon - Watergate

Clinton - Lying to Congress

Trump - Jan 6th & Quid pro Quo

500
This method in Java is the kind of method that is clear, reusable, and does exactly what it is supposed to do.

A well-written method

500

Class is Card

public Card(String cardSuit, int cardValue)


Create an object correctly

Card ace = new Card("Diamond", 11)

500

String school = "Rydell High School";
System.out.println(school.substring(8)); System.out.println(school);

igh School

Rydell High School

500

Which of the following would properly print this quote by Edsger W. Dijkstra (an early pioneer of Computer Science) as shown below?

"Testing shows the presence, not the absence of bugs" --- Edsger W. Dijkstra


System.out.println("\"Testing shows the presence, not the absence of bugs\"");
System.out.println("--- Edsger W. Dijkstra");

500

Federalist 10 argues for a..

Strong centralized government

M
e
n
u