diff --git a/.vscode/launch.json b/.vscode/launch.json index 742d486..55aaf70 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,20 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "type": "java", + "name": "CodeLens (Launch) - E1_17", + "request": "launch", + "mainClass": "Labs.Lab0.E1_17", + "projectName": "H212_e5d32889" + }, + { + "type": "java", + "name": "CodeLens (Launch) - E1_16", + "request": "launch", + "mainClass": "Labs.Lab0.E1_16", + "projectName": "H212_e5d32889" + }, { "type": "java", "name": "CodeLens (Launch) - E1_8", diff --git a/Labs/Lab0/E1_16.java b/Labs/Lab0/E1_16.java index 87cde5b..29ccf64 100644 --- a/Labs/Lab0/E1_16.java +++ b/Labs/Lab0/E1_16.java @@ -9,4 +9,5 @@ public static void main(String[] args) { String name = JOptionPane.showInputDialog("What is your name?"); System.out.println(name); } -} \ No newline at end of file +} +//JFrame window pops up asking my name, I type in tony, tony prints out in the terminal \ No newline at end of file diff --git a/Labs/Lab0/E1_17.java b/Labs/Lab0/E1_17.java index e69de29..d9a097e 100644 --- a/Labs/Lab0/E1_17.java +++ b/Labs/Lab0/E1_17.java @@ -0,0 +1,11 @@ +package Labs.Lab0; +import javax.swing.JOptionPane; + +public class E1_17 { + + public static void main(String[] args) { + String name = JOptionPane.showInputDialog("What is your name?"); + String something = JOptionPane.showInputDialog("My Name is Hal! What would you like me to do?"); + System.out.println("I'm sorry, "+name+". I'm afraid I can't do that."); + } +} \ No newline at end of file diff --git a/Labs/Lab0/R1_9.java b/Labs/Lab0/R1_9.java index 71def05..e7ae064 100644 --- a/Labs/Lab0/R1_9.java +++ b/Labs/Lab0/R1_9.java @@ -6,10 +6,11 @@ public class R1_9 { public static void main(String[] args) { - System.out.println("Hello", "World!"); + // System.out.println("Hello", "World!"); } } //Exception in thread "main" java.lang.Error: Unresolved compilation problem: // The method println(String) in the type PrintStream is not applicable for the arguments (String, String) +// at Labs.Lab0.R1_9.main(R1_9.java:9) -// at Labs.Lab0.R1_9.main(R1_9.java:9) \ No newline at end of file +//note: commented out incorrect code because it was messing up my builds for other classes \ No newline at end of file