Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. /* Реализация метода
  2. Реализуйте метод public static void writeToConsole(String s), который добавляет к началу строки выражение "printing: "
  3. и выводит измененную строку на экран, каждый раз с новой строки.
  4. Пример вывода для "Hello world!":
  5. printing: Hello world!
  6. */
  7.  
  8. public class Solution
  9. {
  10. public static void main(String[] args)
  11. {
  12. writeToConsole("Hello world!");
  13. }
  14.  
  15. public static void writeToConsole(String s)
  16. {
  17. System.out.println("printing: " + s);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement