A void method
A blueprint from which objects are created in java.
What is a class
What is the length of this word: SkibbityRizz
12
Variables that cannot be changed have what infront
final
Name the 3 branches of Government
What is an instance method?
A method that is called on a specific instance (an object) of the class.
A single instance of a class
A object
What method checks to see if two strings have the exact same content?
equals()
The scope of the variable that only exist in the function is.
Local
The process of the Supreme Court ruling on a law or action being constitutional or not
Judicial Review
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;
}
Define State & Behavior
State are the instance variables
Methods are the behavior
What is the substring(1,4) of this word: SkibbityRizz
kib
How long was the government shut down?
43 days
How many members are in the Senate and HOR?
100 & 435
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();
Create 3 state variables for a Pineapple(String, boolean, double)
color, isRipe, weight
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
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
Name the 3 Presidents that have been impeached and why?
Nixon - Watergate
Clinton - Lying to Congress
Trump - Jan 6th & Quid pro Quo
A well-written method
Class is Card
public Card(String cardSuit, int cardValue)
Create an object correctly
Card ace = new Card("Diamond", 11)
String school = "Rydell High School";
System.out.println(school.substring(8)); System.out.println(school);
igh School
Rydell High School
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");
Federalist 10 argues for a..
Strong centralized government