Arush22

Untitled

Dec 6th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. 1. import
  2. 2. true
  3. 11. false
  4. 14. HI
  5. 15. ABCDEFGHIJ
  6. 16. hello
  7. 24. System.out.println(s1+" "+s2+" "+s3);
  8. 25. int characterCount = s.length();
  9. 26. System.out.println("Enter a string:");
  10. String enteredValue = scan.next();
  11. System.out.println("You entered:"+enteredValue);
  12. 27. System.out.println(s1+" "+s2+" "+s3+" "+s4);
  13. 36. DecimalFormat belongs to the text API not the util one.
  14. 37. The s in system is not capitalized.
  15. 38. The code does not include the word "new".
  16. 39. "-" is not an operator or concatenator for strings.
  17. 43. The String variable should be surrounded by double quotes not single quotes.
  18. 45. s currently has no value or string entered into it for the code to count.
  19. 49. The could you entered does not interact with variable "grade". You need to put:
  20. DecimalFormat grade = new DecimalFormat("#.0%");
  21. System.out.println("Your grade is "+grade);
  22. 50. System.out.println("Password 1:");
  23. String word1 = scan.next();
  24. System.out.println("Password 2:");
  25. String word2 = scan.next();
  26. System.out.println(Math.min(word1,word2));
  27. 51. System.out.println("Your Domain Name:");
  28. String domainName = scan.next();
  29. System.out.println("www."+domainName+".com");
  30. 52. System.out.println("Enter a word:");
  31. String word = scan.next();
  32. String upperWord = word.toUpperCase();
  33. String lowerWord = word.toUpperCase();
  34. System.out.println(upperWord);
  35. System.out.println(lowerWord);
  36. System.out.println(word);
  37. 55. System.out.println("Type in a file extension");
  38. String fileExtension = scan.next();
  39. System.out.println("The file extension is: "+fileExtension);
  40. 56. System.out.println("Type in your first and last name");
  41. String firstLastName = scan.next();
  42. System.out.println(firstLastName);
Add Comment
Please, Sign In to add comment