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 2 of 2

Thread: It gives an error but i dont knw its cause...Please solve my problem

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    8
    My Mood
    Amused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation It gives an error but i dont knw its cause...Please solve my problem

    I am a beginner please don't be short tempered....can u please judge me where I v went wrong here

    final class Balances
    {
    int bal;
    }
    class SavingsBal extends Balances
    {
    void checkbal()
    {
    //method implementation
    }
    public static void main(String args[])
    {
    SavingsBal sb=new SavingsBal ();
    }
    }
    public class CurrentBal
    {
    void calcbal()
    {
    //method implementation
    }
    public static void main(String args[])
    {
    CurrentBal cbo=new CurrentBal ();
    }
    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: It gives an error but i dont knw its cause...Please solve my problem

    where I v went wrong here
    What is wrong? Copy the full text of any error messages and paste it here.

    BTW The code has lost its formatting which makes it hard to read and understand. Logically nested statements (within {}s) should be indented.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. [SOLVED] I have a NullPointerException error that I dont understand
    By LukeR in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 14th, 2013, 05:15 PM
  2. Replies: 1
    Last Post: November 4th, 2013, 04:38 AM
  3. Replies: 4
    Last Post: July 25th, 2011, 06:12 PM
  4. My code have a simple error but i dont know how to solve it !!!
    By Blackhawk1993 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 17th, 2011, 01:12 PM
  5. i'm getting this error, dont know why? please help
    By amr in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 17th, 2010, 05:14 AM