This method from JOptionPane is used to display a simple pop-up message: JOptionPane.showMessageDialog(_____, "Message");
null
What is the correct syntax to show a message dialog with the text "Hello World"?
JOptionPane.showMessageDialog(null, "Hello World");
What lines should be swapped/moved?
1. public static void main(String[] args){
2. public class test{
3. System.out.println("Hello world");
4. }
5. }
1 and 2 should swap
What is Java?
A programming language
What is Ms. Dykhuis' first name?
Natalie
public static ____ main (String[] args)
void
What is wrong or missing in this code?
System.out.println(Hello world);
Quotes! " "
What lines should be swapped/moved?
1.public class test{
2.public static void main(String[] args){
3.import javax.swing.*;
4.System.out.println("This is just a test");
5.}
3 should move to the top
What is a variable?
A placeholder for data, a place in memory
How many years has Ms. Dykhuis been teaching?
2
_____ name = "Bob Steve"
String
What is wrong or missing in this code?
JOptionPane.showMessageDialog("Welcome to jeopardy");
null
What is an algorithm?
A set of instructions, sequence of steps, directions
How old is Ms. Dykhuis?
23
JOptionPane.show_______Dialog(null, "I want to display this text", "This is my title", 0);
What is wrong or missing in this code?
name = JOptionPane.showInputDialog(null, "What is your name?","Enter name here" )
;
What lines should be swapped/moved?
1.import javax.swing.*;
2.public class test{
3.public static void main(String[] args){
4.System.out.println("Hello"+name);
5.String name = JOptionPane.showInputDialog(null, "What is your name?");
6.}
7.}
4 and 5 should swap
What is a String?
a sequence of characters that can be letters, numbers, symbols, or spaces between " "
What state is Ms. Dykhuis originally from?
Michigan
vacay = (_____)JOptionPane.showInputDialog(null, "Where do you want to go?", "Vacation", -1, myPic, null, "Ex. Mexico");
String
What is wrong or missing in this code?
color = JOptionPane.showInputDialog(null, "Enter your favorite color");
String color;
String color should come before the input box
What lines should be swapped/moved?
1.public class test{
2.public static void main(String[] args){
3.String name = "Bob", job = "teacher";
4.System.out.println(name+" is a "+age+" year old +job);
5.int age = 28;
6.}
7.}
5 should be before 4
What is an argument?
A value that you give a command/function
What programming language did Ms. Dykhuis learn in college?
C++