Advertisement
Guest User

Untitled

a guest
Nov 19th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // Я хочу написать класс с методом, вызывая который из другого класса я буду получать вывод текста на экран.
  2.  
  3. public class Display{
  4. void Out(){
  5. System.out.println();
  6. }
  7. }
  8. //Это класс с методом.
  9.  
  10. public class TestDisplay{
  11. public static void main(String[] args){
  12. Display d=new Display();
  13. d.Out("It's working?");
  14. }
  15. }
  16. //При вызове метода Out, должно выводится то что я записал в скобках? Поясни пожалуйста How it work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement