Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Я хочу написать класс с методом, вызывая который из другого класса я буду получать вывод текста на экран.
- public class Display{
- void Out(){
- System.out.println();
- }
- }
- //Это класс с методом.
- public class TestDisplay{
- public static void main(String[] args){
- Display d=new Display();
- d.Out("It's working?");
- }
- }
- //При вызове метода Out, должно выводится то что я записал в скобках? Поясни пожалуйста How it work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement