Vendrick-Xander

HW #8

Dec 5th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. 1. import
  2. 11. false
  3.  
  4. 14. HI
  5. 15. ABCDEFGHIJ
  6. 16. hello
  7.  
  8. 24. String s = (s1 + s2 + s3);
  9. System.out.println(s);
  10. 25. int length = s.length();
  11. System.out.println(length);
  12. 26. //not sure how to make it store a user input as a string value, but once you do that all you need to do is .length the name of the string and then have that in be printed with some text before and after it saying "your string is x letters long"
  13. 27. System.out.println(s1 + s2 + s3 + s4);
  14.  
  15. 36. decimal format is not a library so it cannot be imported(?)
  16. 37. when the line is going to be printed the word "system" is not capitalized
  17. 38. the "String" the actual text value is not necessary
  18. 39. no parentheses around the s1-s2
  19. 43. single quotes were used around the H when it should have been double quotes because it is a string value
  20.  
  21. 45. no value was declared for s so it was not able to print a the value of l because it did not exist
  22. 49. I am not familiar with the decimal format class so i do not know exactly, but my best guess is the there was syntax error when you attempted to apply the method to the int
  23.  
  24. 50. // i still dont know how to register inputs from the key board, but i will declare that one of them is x and the other is y
  25. int xl = x.length();
  26. int yl = x.length();
  27. if x1 > y1
  28. System.out.println(y1);
  29. else
  30. System.out.println(x1);
  31. 51. // still dont know how to register inputs from the user, but the input will be labelled d
  32. string w = "www.";
  33. string c = ".com";
  34. System.out.println(w + d + c);
  35. 52. // i am not sure if there is a method to do this, but you would want to print string.toUpperCase and then print string.toLowerCase and then lastly print string
  36. 55. I legitimately have no idea how you would do this. Maybe there is a method that allows you to only register characters after the code has seen some other character, but i dont know what that method is
  37. 56. Like the previous question, I can think of how this might be done, but I do not the actual method names to call in order to actually execute this.
Add Comment
Please, Sign In to add comment