fork download
  1.  
  2. import java.util.Scanner;
  3. import hirondelle.date4j.DateTime;
  4. import java.util.TimeZone;
  5.  
  6. public class test{
  7. public static void main(String[] args){
  8.  
  9. Scanner input = new Scanner(System.in);
  10. String str = "12345";
  11. Integer myNum = 0;
  12. myNum = Integer.parseInt(str);
  13. System.out.println(myNum);
  14.  
  15. String str2 = "Italy";
  16. //str2 = str2.toLowerCase();
  17.  
  18. String str3 = "italy";
  19.  
  20. if(str2.equalsIgnoreCase(str3)){
  21. System.out.println("They are equal");
  22. }
  23. else{
  24. System.out.println(str2);
  25. System.out.println(str3);
  26. System.out.println("They are not equal ");
  27. }
  28.  
  29. System.out.println("Enter a phrase: ");
  30. String phrase = input.nextLine();
  31.  
  32. phrase = phrase.toLowerCase();
  33. if(phrase.contains("four score")){
  34. System.out.println("Gettysburg");
  35. }
  36. else{
  37. System.out.println("Not Gettysburg");
  38. }
  39.  
  40.  
  41. DateTime now = DateTime.now(TimeZone.getTimeZone("UTC"));
  42. System.out.println("The Current time in UTC is: " + now);
  43.  
  44.  
  45. }
  46. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:6: error: class test is public, should be declared in a file named test.java
public class test{
       ^
Main.java:3: error: package hirondelle.date4j does not exist
import hirondelle.date4j.DateTime;
                        ^
Main.java:41: error: cannot find symbol
		DateTime now = DateTime.now(TimeZone.getTimeZone("UTC"));
		^
  symbol:   class DateTime
  location: class test
Main.java:41: error: cannot find symbol
		DateTime now = DateTime.now(TimeZone.getTimeZone("UTC"));
		               ^
  symbol:   variable DateTime
  location: class test
4 errors
stdout
Standard output is empty