dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: how can i explain this without computer

  1. #1
    Join Date
    Dec 2004
    Location
    oman
    Posts
    105

    how can i explain this without computer

    class Child2 extends Parent{
    private int a= 10;private int b= 20;
    private void write (){
    int c= a+ b;
    System.out.println("The addition is"+ c);}
    public static void main(String[] arg){
    Child2 c=new Child2();
    c.add();
    c.write();
    c.x=1000;
    c.y=2000;
    System.out.println("Now x is" + c.x);
    System.out.println("Now y is" + c.y);
    }
    }
    class Brother2 extends Parent{
    public static void main(String[] arg){
    Brother2 c=new Brother2();
    c.add();
    c.x=7000;
    c.y=5700;
    System.out.println("Now x is" + c.x);
    System.out.println("Now y is" + c.y);
    }
    }
    please gentelmen and ladies how can i explain the program's execution for searching the output for results regarding to mathmatics without using the computer
    how can we tell our brain to extract output if it is division instead ("Now y is" + c.y);

  2. #2
    Join Date
    Apr 2005
    Location
    Perth, Australia
    Posts
    340
    not very well apparently...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles