Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: The program is right... but nothing is coming in the output....pleasse help...

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post The program is right... but nothing is coming in the output....pleasse help...

    import java.util.Scanner;
    class Balance
    {
        Scanner sc=new Scanner(System.in);
        int bal;
        void balc()
        {
            System.out.println("\n Enter the Amount : ");
            bal=sc.nextInt();
     
        }
    }
    class Withdraw extends Balance
    {
        int amtw;
        void wtdrw()
        {
            balc();
            System.out.println("\n Enter the amount to withdraw : ");
            amtw=sc.nextInt();
            if(bal>amtw)
            {
                amtw=bal-amtw;
            }
            else 
                    {
                        System.out.println("\n Cannot Withdraw ");
     
            }
        }
    }
    class B extends Withdraw
    {
        public static void main(String[] args)
        { 
            int i;
            Scanner sc= new Scanner (System.in);
            String desg;
            String s1="balance";
            String s2="withdraw";
     
            System.out.println("\n Banking process ");
             Withdraw[] obj = new Withdraw[4];
            for(i=1;i<3;i++)
            {
            System.out.println("\n Enter the process : ");
            desg=sc.nextLine();
            if(desg.equals(s1))
            {
                obj[i]=new Withdraw();
                obj[i].balc();
            }
            else if(desg.equals(s2))
            {
                obj[i]= new Withdraw();
                obj[i].wtdrw();
     
            }    
     
            }
     
        }
    }


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,307
    Thanks
    181
    Thanked 824 Times in 767 Posts
    Blog Entries
    5

    Default Re: The program is right... but nothing is coming in the output....pleasse help...

    Do you have a question?

  3. #3
    Member
    Join Date
    May 2011
    Location
    west palm beach, FL
    Posts
    189
    My Mood
    Tired
    Thanks
    41
    Thanked 11 Times in 10 Posts

    Default Re: The program is right... but nothing is coming in the output....pleasse help...

    i dont understand what you mean by nothing is coming in the output...do you mean nothing at all shows in the console like the enter balance and such?

  4. #4
    Junior Member
    Join Date
    May 2013
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: The program is right... but nothing is coming in the output....pleasse help...

    Yes....the program isn't showing me anything at all.. its not asking me anything....when I run..it just shows... BUILD SUCCESSFULL..(run time: 0 seconds)

  5. #5
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    604
    My Mood
    Sleepy
    Thanks
    10
    Thanked 90 Times in 83 Posts

    Default Re: The program is right... but nothing is coming in the output....pleasse help...

    Looks like you're building it not running it.

Similar Threads

  1. Guyyzz,the output is not coming-- PLS HELP
    By Ashish S in forum What's Wrong With My Code?
    Replies: 9
    Last Post: June 3rd, 2013, 02:39 AM
  2. Issue with treeset and output from program
    By neveser in forum What's Wrong With My Code?
    Replies: 3
    Last Post: December 7th, 2012, 08:47 PM
  3. I/O Program output error
    By gatorsgirl in forum File I/O & Other I/O Streams
    Replies: 8
    Last Post: April 11th, 2012, 04:18 PM
  4. Output not coming through properly
    By Camiot in forum What's Wrong With My Code?
    Replies: 6
    Last Post: May 16th, 2011, 09:25 PM
  5. No Output in Program:
    By bengregg in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 17th, 2011, 10:01 PM