Super Class of Java

can any one tell what is the super class of JAVA?

How can u assume a to be = b and then prove that a = b based on the assumption that a=b... --:)
also 0 = 1 ....> which leaves Aryabhatta thinking why the Hell did I invented zero , when it will turn out to be 1 in future .:). no NOR gates required .. cool ... No boolean datatype required ....... rather no computer bo byte funda when 1 = 0 ..... Hurray so no Java ...... No Exceptions ..... So we would be only left with our old Crashproof Word Processor ( Commonly known as TypeWriter)

Similar Messages

  • Super class for java Language

    which is the super class for java Language...
    this is an interview question .
    I SAY Object is the super class for java Language ...
    then he asked whether object class will extend ??
    i say Yes it will implectly extend ...
    then he whether each and every class will extend object
    i say yes ...
    then he asked multiple inheritance is possible in java ...
    i say no ...
    then how will say object class will extend in each and every class....
    hai friends if there is any solution tell mem
    by
    dhana

    which is the super class for java Language...
    this is an interview question .
    I SAY Object is the super class for java Language
    ge ...If you mean the ultimate parent of all classes, yes.
    (Although it's not the parent of interfaces.)
    then he asked whether object class will extend ??
    i say Yes it will implectly extend ...Not sure what is meant by "will object extend."
    then he whether each and every class will extend
    object
    i say yes ...Correct.
    then he asked multiple inheritance is possible in
    java ...
    i say no ...Correct. At least in the usual sense. When people talk about multiple inheritance, the usually mean multiple inheritance of implementation, such as C++ supports. The ability to implement more than one interface in Java is sometimes referred to as multiple inheritance of interface. I don't know if that term is in common use outside of Java.
    then how will say object class will extend in each
    and every class....
    hai friends if there is any solution tell memMultiple inheritance means that a class' ancestors are not all in a straight line to the ultimate parent. That is, not all ancestors are parents or children of each other.
    You are you father's son, and he is his father's son, and so on. So your grandfather is your ancestor, and so is your father. This is not MI.
    You also have a mother. She's neither an ancestor nor a descendant of your father. That's MI.

  • Why Object is a super class in java?

    hi all i have got one basic doubt in java. why Object class is a super class in java. C++ is also a object oriented language but there there is no concept of making object as a super class, but in java why we are having that. thanks

    Personally, I find the fact that C++ (and Delphi) DOES NOT have a common base class something of an inconvenience at times. The reason is that Java is an (almost) pure Object Oriented language, while C++ and Delphi are partially-object-oriented additions to C and Pascal respectively.
    RObin

  • JBuilder: Failed to Load Super Class java.lang.Object

    Hi I am a beginner of JBuilder. When I tried to compile some samples from JBuilder, the compiling failed because "Failed to Load Super Class java.lang.Object." Any clue to fix the bug?
    Mark

    Hi
    Thanks for you guys' help. I found that when I create a project, the JBuilder's JDK homepath pointed by default to a JDK directory not existed. Therefore, I modified the JDK homepath through Tools/Configure JDKs. Then it worked.

  • Problem with subclass and super class

    here is the things i wanted to do
    /*Write a method that takes the time as three integer arguments (hours, minutes and seconds),
    and returns the number of seconds since the last time it was twelve o'clock.
    Write a program that uses this method to calculate the amount of time in seconds between two times,
    assuming both are within one twelve hour cycle of a clock.
    here is a class to find the last time closes to 120'clock in sec.
    import java.io.*;
    public class Timer {
         int converter = 60;
         int secinTwelveHour = 43200;
         int converter2 = 12;
    public int timerTime (int hour, int min, int sec){
              int totalSec = 0;
              //Finding the time
              if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour <= 11){
                   //find last 12 o'Clock
                   hour = converter2 + hour;
                   //change to sec time
                   totalSec = (hour * converter * converter) + (min * converter) + sec;
              }else{     
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour >= 12){
                   //find last 12 o'Clock in sec
                   totalSec = ((hour * converter * converter) + (min * converter) + sec) - secinTwelveHour;
         }else{
              return -1;
    }//End of return -1      
              }//End of first else statment
         return totalSec;     
         }//End of timerTimer
    }//End of Program     
    and here is the super class which uses the class aboved
    import java.io.*;
    public class FindTime {
    public int find2Time (int totalSec1, int totalSec2){
              int timeSec = 0;
              if(Timer.totalSec1 > Timer.totalSec2)
              timeSec = Timer.totalSec1 - Timer.totalSec2;
              else
              timeSec = Timer.totalSec2 - Timer.totalSec1;
         return timeSec;     
         }//End of find2Time
    public static void main( String [] arg){
         // Construct an instance of the Timer class
              Timer timerClass = new Timer();
              // Make a couple of calls of the method
              int totalSec1 = timerClass.timerTime(12, 3, 45);
              int totalSec2 = timerClass.timerTime(14, 23, 60);
              timeSec1 = find2Time (totalSec1, totalSec2)
              // Now print the values we got back
              System.out.println("Last closes Sec to 12 o'clock" + totalSec1);
              System.out.println("Last closes sec to 12 o'clock" + totalSec2);
              System.out.println("Last closes sec to 12 o'clock" + timeSec);
         }//End of main method
    }//End of Program     
    Now i'm having program with the compliing can anyone help me out like tell me what i'm doing wrong and give me a bit of a code so that i can have a push start
    thanks you

    Does this do what you want? It is in two seperate classes.
    import java.io.*;
    public class FindTime {
    public static void main( String [] arg){
    int timeSec = 0;
    // Construct an instance of the Timer class
         Timer timerClass = new Timer();
         // Make a couple of calls of the method
         int totalSec1 = timerClass.timerTime(12, 3, 45);
         int totalSec2 = timerClass.timerTime(14, 23, 60);
         timeSec = java.lang.Math.abs(totalSec1-totalSec2);
         // Now print the values we got back
         System.out.println("Last closes Sec to 12 o'clock " + totalSec1);
         System.out.println("Last closes sec to 12 o'clock " + totalSec2);
         System.out.println("Last closes sec to 12 o'clock " + timeSec);
         }//End of main method
    }//End of Program
    import java.io.*;
    public class Timer {
    int converter = 60;
    int secinTwelveHour = 43200;
    int converter2 = 12;
    public int timerTime (int hour, int min, int sec){
         int totalSec = 0;
         //Finding the time
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour <= 11){
         //find last 12 o'Clock
         hour = converter2 + hour;
         //change to sec time
         totalSec = (hour * converter * converter) + (min * converter) + sec;
         } else {
         if (hour > 0 && hour <= 24 && min > 0 && min <=60 && sec > 0 && sec <= 60 && hour >= 12){
         //find last 12 o'Clock in sec
         totalSec = ((hour * converter * converter) + (min * converter) + sec) - secinTwelveHour;
         } else {
              return -1;
         }//End of return -1
    }//End of first else statment
    return totalSec;
    }//End of timerTimer
    }//End of Program

  • Overwriting a method of a super class in the subclass ???

    Hi,
    can somebody tell me whether it's possible to add a new implementation of a method in the sub class which is inherited from a super class?
    I want to model my program in that way:
    1. I define a super class with some implemented methods.
    2. This class should be inherited in a sub class. One method should be used as it was implemented in the super class but another method should be overwritten in the subclass.
    I know this concept from Java but I couldn't find a way how to do it in ABAP
    Many thanks for any help!
    Best regards,
    Birgit

    hi,
    yeas you can do it,
    Subclass can re-implement  the inherited public and protected methods from superclass.Class C1 contains method METH1(public) and METH2(protected), both of which are modified and re-implemented in  its subclass C2.also you can have ur own methods in subclass.Objects are created out of both classes and the method METH1 for both objects are called.
    Output of the program demonstrates different behaviour for method METH1 of class C1 and C2.
    This demonstrates the theme.
    REPORT YSUBDEL.
    CLASS C1 DEFINITION.
      PUBLIC SECTION.
       METHODS : METH1.
      PROTECTED SECTION.
       METHODS METH2.
      ENDCLASS.
    CLASS C1 IMPLEMENTATION .
      METHOD : METH1.
       WRITE:/5 'I am meth1 in class C1'.
       CALL METHOD METH2.
      ENDMETHOD.
      METHOD : METH2.
       WRITE:/5 ' I am meth2 in class C1 '.
      ENDMETHOD.
    ENDCLASS.
    CLASS C2 DEFINITION INHERITING FROM C1.
    PUBLIC SECTION.
      METHODS : METH1 redefinition,
      meth3.
    PROTECTED SECTION.
      METHODS : METH2 redefinition.
    ENDCLASS.
    CLASS C2 IMPLEMENTATION.
    METHOD METH1.
       WRITE:/5 'I am meth1 in class C2'.
       call method meth2.
    endmethod.
      METHOD : METH2.
      WRITE:/5 ' I am meth2 in class C2 '.
    ENDMETHOD.
    METHOD : METH3.
      WRITE:/5 ' I am own method of class C2'.
    ENDMETHOD.
    endclass.
    START-OF-SELECTION.
      DATA : OREF1 TYPE REF TO C1 ,
             OREF2 TYPE REF TO C2.
      CREATE OBJECT :  OREF1 , OREF2.
      CALL METHOD : OREF1->METH1 ,
                    OREF2->METH1.
    hope it helps,
    regards

  • Weird one..  i can't return a variable from the extended to the super class

    Hey everyone, i hope i'm not annoying you guys :)
    So today's problem is to return a variable (int) from a method of the extended class and print it ont the super class.
    I'm just testing the super class , if it works fine.
    So the extended class ( FileIO) just read the file txt and return the integer or string ( from the txt file)
    I already did a main method to that class and tested it, it works fine.
    So now the problem is to print the integer ( that the extended class gets from the txt. ) inside the Super class. I mean , is the same thing but now im testing the Super class , just have to do the same thing, a super class method calls the extended class method and receive the integer from the txt file.
    i think the problem is when i create the instance of the FileIO object , maybe its constructor ...i don't know.
    The name of the txt file is passed from the super class to the extended class, but i think the error is not from there.
    this.aero_le = new BufferedReader(new FileReader(super.ficheiroleitura_aero()));  //  super calls ficheiroleitura_aero()  and receive the name of the txt file ( e.g "temp.txt")  so i think that is correct.
    here's the code of the Super class public class Aeroporto {
         private String filereader_voo = "temporary.txt";
         private String filereader_aero = "temp.txt";
         private String siglaAero = "";
         public FileIO file;
         public Aeroporto(){};
         public Aeroporto(String filereader_voo, String filereader_aero) throws IOException{
              this.filereader_voo = filereader_voo;
              this.filereader_aero =filereader_aero;     
              file = new FileIO();
         public String siglaAero() {
              return siglaAero; }
         public String filereader_aero(){
              return filereader_aero;
    public int nrLines() throws IOException{   // it was supose to retunr the number of lines ( integer) from the txt file .
              return Integer.parseInt(file.lerLinhaN(1,1));
    // main() {
    Aeroporto a = new Aeroporto();
              int v = a.nrLines();
              System.out.print(v);
    // ***********************************************************+
    // Extended Class
    public class FileIO extends Aeroporto{
         private String ficheiroescrita;
         private PrintWriter vooescreve, aeroescreve ;
         private BufferedReader voo_le, aero_read;
         public FileIO(){}
         public FileIO(String filereader_voo, String filereader_aero, String ficheiroescrita) throws IOException {
              super(filereader_voo, filereader_aero);
              this.ficheiroescrita = ficheiroescrita;
              //If file does not exists , create one.
              try{
                   this.aero_read = new BufferedReader(new FileReader(super.filereader_aero()));
                   aero_read.close();
              catch(IOException ex){
                   this.aeroescreve = new PrintWriter(new FileWriter(ficheiroescrita));
                   aeroescreve.close();
    public String lerLinhaN(int line, int column) throws IOException{  // this method works fine , i already tested this class.
              this.aero_read = new BufferedReader(new FileReader(super.filereader_aero()));
              for(int i = 0; i != line-1; ++i) aero_read.readLine();
              String linha = aero_read.readLine();
              String [] words = linha.split(" ");
              return words[column-1];
    Maybe the error is that i use to test the Super class a default contructor on both classes... i don't know where the error is, i also did two small classes ( super and another that extends ) and get the string "Hello" from the super and print it inside the extended..and it works, that's why i think the error is when i call the extended class .. need help.
    thanks.

    Ok,
    This one might actually work... atleast it compiles.import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.File;
    import java.io.PrintWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    public abstract class FileIO {
         public static boolean CreateOutputFileIfNotExists(
              String outputFilename //the name of the file to ensure exists.
         ) throws IOException
              final String functionName = "FileIO.CreateOutputFileIfNotExists";
              boolean retVal = false;
              //If the output file does does not exist then create it.
              //post condition: output file exists or an IOException has been thrown.
              BufferedReader infile = null;
              try{
                   infile = new BufferedReader(new FileReader(outputFilename));
                   retVal = true;
              } catch(IOException ex) {
                   PrintWriter outfile = null;
                   try {
                        outfile = new PrintWriter(new FileWriter(outputFilename));
                        retVal = true;
                   } catch(IOException ex2){
                        throw new IOException(functionName + ": cannot create output file " + outputFilename, ex2);
                   } finally {
                        outfile.close();
                        if (outfile.checkError()) {
                             throw new IOException(functionName + ": error on output stream " + outputFilename);
              } finally {
                   try {
                        infile.close();
                   } catch(IOException ex){
                        throw new IOException(functionName + ": cannot close output file " + outputFilename, ex);
              return(retVal);
         public static String readLine(
                   String  inputFilename //the name of the file to read.
              , int     lineNumber    //1 based number of the line to read from.
         ) throws IOException
              final String functionName = "FileIO.readLine";
              String outputLine = null;
              // reads the numbered "lineNumber" from "inputFilename".
              BufferedReader infile = null;
              try {
                   infile = new BufferedReader(new FileReader(new File(inputFilename)));
                   for(int i=1; i<lineNumber; ++i) infile.readLine();
                   outputLine = infile.readLine();
              } catch(IOException ex){
                   throw new IOException(functionName + ": cannot read input file " + inputFilename, ex);
              } finally {
                   try {
                        infile.close();
                   } catch(IOException ex){
                        throw new IOException(functionName + ": cannot close input file " + inputFilename, ex);
              return(outputLine);
         public static String readWord(
                   String inputFilename  //the name of the file to read.
              , int lineNumber        //1 based number of the line to read from.
              , int wordNumber        //0 based number of the word to read.
         ) throws IOException
              final String functionName = "FileIO.readWord";
              String outputWord = null;
              // reads the numbered space-seperated "wordNumber" from the numbered "lineNumber" of "inputFilename"
              try {
                   String[] words = FileIO.readLine(inputFilename, lineNumber).split(" ");
                   if (wordNumber>0 && wordNumber<words.length) outputWord = words[wordNumber-1];
              } catch(IOException ex){
                   throw new IOException(functionName + ": cannot read input file " + inputFilename, ex);
              return(outputWord);
    }Design notes... FileIO is a generic helper class... there is nothing specific to Airports, flights, or any other "domain" specific stuff in it... so it's re-usable... you can keep it and reuse it on other projects, or even share it with your friends.
    So... The airport class will just call the static methods on FileIO like this    ....
        int lineNumber=1;
        int wordNumber=1;
        String airportCode = FileIO.readWord(airportsFilename, lineNumber, wordNumber);
        ....How's that?
    corlettk: my now mandatory edit.

  • Generic interface in abstract super class

    hello java folks!
    i have a weird problem with a generics implementation of an interface which is implemented in an abstract class.
    if i extend from this abstract class and try to override the method i get this compiler error:
    cannot directly invoke abstract method...
    but in my abstract super class this method is not implemented as abstract!
    do i have an error in my understanding how to work with generics or is this a bug in javac?
    (note: the message is trown by the eclipse ide, but i think it has someting to do with javac...)
    thanks for every hint!
    greetings daniel
    examples:
    public interface MyInterface <T extends Object> {
       public String testMe(T t);
    public abstract class AbstractSuperClass<T extends AbstractSuperClass> implements MyInterface<T> {
       public String testMe(T o) {
          // do something with o...
          // now we have a String str
          return str;
    public final class SubClass extends AbstractSuperClass<SubClass> {
       @Override
       public String testMe(SubClass o)
          return super.testMe(o);
    }

    Hi Wachtda,
    Firstly, T extends Object is redundant as all classes implicitly extend the Object class.
    Therefore :
    public interface MyInterface <T> {
       public String testMe(T t);
    }Secondly, abstract classes may have both abstract and non-abstract instance methods. Also, two methods, one abstract and one non-abstract, must have a different signature.
    The following example will give a compile error because the methods share the same signature :
    abstract class Test {
         public void sayHello() {
              System.out.println("Hello");
         abstract public void sayHello();
    }Therefore, to make an interface method as abstract would simply block the possibility of implementing it.
    BTW, you can do this :
    abstract class Test {
         public void sayHello() {
              System.out.println("Hello");
         abstract public void sayHello(String name);
    }Finally, there's no bug in javac.

  • Javah problem - super class could not be found !!

    Hi all,
    i have already posted this message but i didn't get enough help to solve my poor situation.
    and this is my problem:
    i got in my project (myProject) MyClass class.
    i wrote in another java class ,in OtherClass.class ,jni function that use MyClass object as parameter to the jni interface, as follow:
    private native int myFunction (MyClass obj); //function in OtherClass
    when i write the javah command line :
    javah -jni OtherClass (in order to create OtherClass.h)
    i always get the following error:
    A required super class myPackage.MyClass could not be found.
    my qoustion is how can i let the javah command line to know about the existence of myPackage.MyClass and how can i create and .h file when i using other class instance as jni function parameter in other class??
    Thanks Sendy.

    Lets define a few terms here.
    Java can be a java virtual machine which is what runs when you type 'java' on the command line. It is also represented by the compiler which runs when you type 'javac'. And in your case it also is represented by 'javah'.
    The class path defines where java finds classes that it needs.
    In older versions of java you had to tell it where to find everything. It couldn't even find java.lang.String unless you told it were it was. Now days you have to tell it where to find stuff that you add (or where 3rd party libraries are.)
    There are two ways to define the class path: a command line option and an environment variable.
    A class path can, currently, have three types of things in it:
    -A path to a zip file
    -A path to a jar file
    -A path
    For example
    -Path to zip file in windows: C:\mystuff\mylib\mystuff.zip
    -Path to zip file in unix: /opt/system/projects/mystuff/mystuff.zip
    -Path to jar file in windows: C:\mystuff\mylib\myjar.jar
    -Path to jar file in unix: /opt/system/projects/mystuff/myjar.jar
    -Path in windows: C:\mystuff\mylib
    -Path in unix: /opt/system/projects/mystuff
    Zip files aren't used as much anymore, but you should at least be aware of them.
    Java uses the class path to look for classes which are stored in files. It does this by translating the class name into a file name. It uses packages as directory names and class names as file names. So in your case it would try to find a class called myPackage.MyClass in a file called myPackage\MyClass.class. It would try to find that in any zip files, jar files, in in any paths that you specified in the class path.
    So java is trying to find myPackage\MyClass.class in your class path. It would try to find that in any zip files, jar files, in in any paths that you specified in the class path.
    Right now your class path is probably just "." which means that if you do the following commands
    cd C:\mystuff
    javah -jni OtherClass
    Then java is going to try to find myPackage.MyClass in the following file
    .\myPackage\MyClass.class
    That, because you 'cd' to C:\mystuff, translates to the following absolute path
    C:\mystuff\myPackage\MyClass.class
    So if java doesn't find that file then it is going to tell you that it can't find the file.
    So where is your file? Let's say it is here.
    C:\work\lib\myPackage\MyClass.class
    So you must tell javah where the root is. Keep in mind that 'myPackage' must be part of the path. That is not optional. The root is the directory above 'myPackage'. So the root is
    C:\work\lib
    So now you have a path that is ready for your class path. So your javah command could look like this
    javah -classpath ".;C:\work\lib" -jni OtherClass
    Or using an environment variable
    set CLASSPATH=.;C:\work\lib
    javah -jni OtherClass
    Keep in mind in the above that class path is a generic term and there can be other ways to define it. For example the Sun command "java" allows you to use "-classpath" or "-cp".
    So does the above help?

  • How to indicate the object of the super Class ?

    hello,
    I need to notify when one dialog is close to the class that generated it.
    Of course I do it from the method windowClosing() in the class WindowAdapter.
    But if I use "this" how parameter in the method, I noted the value is that of the inner anonymous class, and not that of the dialog class.
    I write down some code to reproduce the problem ....
    public ReferenceToTheSuperClass() {
            final SecondClass sc = new SecondClass(this);
            jButton1 = new javax.swing.JButton();
    //        final ReferenceToTheSuperClass xx = this;
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                     sc.checkSuper(xx);                    // work
                     sc.checkSuper(this);                   // not work
                     sc.checkSuper(super.getClass()); // not work
    }  // ReferenceToTheSuperClass
    class SecondClass {
        ReferenceToTheSuperClass superiorClass;
        public SecondClass(ReferenceToTheSuperClass supClass){
            superiorClass = supClass;
        public void checkSuper(Object o){
            if (o instanceof ReferenceToTheSuperClass){
                JOptionPane.showMessageDialog(null,"HELLO");
    } // SecondClass My ask is: It is possible to indicate the value of the instance of the super Class, inside one his anonynimous inner class?
    thank you
    regards
    tonyMrsangelo

    thank you for your kinkly answer jeverd,
    yes what you say is right, in this case the class is only nested (in the hurry I used a wrong word).
    About the sintax, I vould find only a short statement to use inside the inner anomymous class and, reading what you say, I can guess it is not possible to do it..
    again thank you
    regards
    tonyMrsangelo

  • Nor any of its super class is known to this context ...problem

    hi all
    i have simple complex object in jave that looks like this :
    @XmlAccessorType(XmlAccessType.FIELD)
    public class MyID{
        @XmlAttribute
        public short dbnum = (short)0;
        @XmlAttribute
        public short usernum= (short)0;
        @XmlAttribute
        public long userid = (long)0;
        public MyId(){
    }i converted it with jaxb and it generete me corespanding java object with the propreate geters and seters
    now when i try to in the server side to insert this object into List<Object> im geting error saing :
    Caused by: javax.xml.bind.JAXBException: com.WebServices.datastructures.MyID nor any of its super class is known to this context
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:474)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:557)
    ... 47 more
    i must say that if i send back only this object (MyID) the unmarsheling passed successfully
    thanks for your help

    Ok I found it out
    jboss was using the jre default axis impelmentation while the server where my client was deployed was using the axis 2 implementation
    I changed the server to use jre default axis and things worked now
    Thanks
    Sapan

  • Calling constructor of super class

    Hello everyone! I'm a student. I hope I can find guidance. Here's the issue:
    Super class: Property
    Sub class: House
    constructor of parent class:
    protected Property(String id, char status, String address,
            String tenet, String landlord, long rent, char freq,
            long amtDue, String date, boolean repair, char tradesman)
            this.id = id;
            this.status = status;
            this.address = address;
            this.tenet = tenet;
            this.landlord = landlord;
            this.rent = rent;
            this.freq = freq;
            this.amtDue = amtDue;
            this.repair = repair;
            this.tradesman = tradesman;
            SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yy");
            this.dateDue = formatter.parse(date, new ParsePosition(0));
        }the constuctor of the sub class:
    public House(String id, char status, String address,
            String tenet, String landlord, long rent, char freq,
            long amtDue, String dateDue, boolean repair, char tradesman,
            int broom, int proom, int throom, boolean garden,
            boolean garage, boolean heating)
        super(id, status, address, tenet, landlord, rent, freq,
            amtDue, dateDue, repair, tradesman);
        this.broom = broom;
        this.proom = proom;
        this.throom = throom;
        this.garden = garden;
        this.garage = garage;
        this.heating = heating;
        }I'm sure you notice I'm calling the constructor of the Property in House. That;s where the error is when i try to compile either class. This is the error it shows within the House class.
    Object() in java.lang.Object cannot be applied to (java.lang.String,char,java.lang.String,java.lang.String,java.lang.String,long,char,long,java.lang.String,boolean,char)
    Maybe its elementary? Thanks in advance..

    You haven't pasted all the code so I can only guess that the class House does not extend Property class.
    public class House extends Property
      // put the constructor here
    }If the House class does not extend Property (or any other class) it just extends (by default) the Object class, which does not have the constructor of Property class.
    Hope it helps
    Nick

  • Constructor of derived-class has to call constructor  of super-class?

    In java, constructor of derived-class has to call constructor of super-class? there is no way to omit this step?

    Correct. If you do not explicitly call the constructor, a call to the no-arg c'tor, super(), is automatically inserted.
    It would be a mess to have it any other way. You'd be creating objects that are not completely initialized. They'd be in an invalid state.
    Constructor rules:
    1) Every class has at least one ctor.
    1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
    1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
    1.3) Constructors are not inherited.
    2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
    2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.

  • Hiding of super class members in subclass

    I want to hide super class members in subclass. like this
    class super{
    public int method(){
    class sub extends super{
    public string method(){
    give any solution for this criteria, I cann't make methods as private

    In java there is no way to override
    the methodsThat's incorrect. You can override methods in Java.
    However, you cannot do what the OP is trying to do.

  • Super class methods

    How to get the methods of current class and its super class using reflection. The retrieved methods should be only the methods of user-defined classes but not methods of Java APIs such as Object or any other class provided in JDK.
    For ex, If Class B is inheriting Class A, i need the methods which are declared only in A & B but not from the Object Class. Similarly, If class C is extending any JDK API such as Thread, I need only the methods declared in class C.

    thanku very much for the answer.
    I am trying to execute the methods of another class using reflection. So I have to consider the inherited methods also. For that, I have to differentiate between standard classes & user-defined classes.Assume that u have one GUI screen where in once u select a class all its methods including inherited methods have to be displayed.
    I can get the the superclass using the method getSuperClass(). But inorder to get the protected methods of superclass what is the method to be used ? If I use getMethods(), it returns only public methods, where as getDeclaredMethods() returns all the methods. Since I have to execute only public & protected methods, what is the best way to solve this ?

Maybe you are looking for

  • AppleTalk disabled in System Preferences

    I have been computing and printing successfully for a long time. I connect my G3, running OS 10..3.9, with my Apple Select 360 through an Asanté Talk box. But now, returning after ten days absence, I can't print. I am getting the error message: "Appl

  • C202 idoc generation

    Hello All, I have a requirement like this. For transaction C202, (Master recipe change), when I go to Materials->BOM and change material quantity, and save the document, an idoc should be created. We hve Idoc type, Message type and Object type copied

  • Backup not being executed

    Hi everybody. In Oracle 10g, Windows, I have a problem: the backup I've scheduled to execute everyday at 2 AM, is not executed if dbconsole is not running. I thought that scheduling via EM dbconsole was simply an interface to different programs, in t

  • How can i wrap a tag around content?

    how can i wrap a tag around content? for example if i have a block of text, in previous versions of dw i could just select a block of text and click the p tag in the file menu and dw would put opening and closing tags. now in creative cloud version i

  • Airtunes option suddenly not available

    Help, I recently got the airport express and I had an option in Itunes to select internal speakers or remote speakers but I never had remote speakers. Now I went out and bought some but when I open Itunes the option is no longer there. Any Ideas? Itu