Share on Google+Share on Google+

java class
1 Answer(s)      7 years ago
Posted in : Java Interview Questions


View Answers

August 10, 2009 at 4:49 PM

Hi Friend,


Overriding-These are the methods having same name,same parameters and same return types of a super class in its subclass. For ex-

class A {
int i;
A(int a, int b) {
i = a+b;
void add() {
System.out.println("Sum of a and b is: " + i);
class B extends A {
int j;
B(int a, int b, int c) {
super(a, b);
j = a+b+c;
void add() {
System.out.println("Sum of a, b and c is: " + j);
class MethodOverriding {
public static void main(String args[]) {
B b = new B(10, 20, 30);


Related Tutorials/Questions & Answers:
Java class
Java class  What is the purpose of the Runtime class
java class
java class  write a java program to display a msg "window closing" when the user attempts to close the window.(a) create a window class (b) create frame within the window class (c) extends window adapter class to display the msg
java class
java class  please send me the answer of the question which i have send according of java class assoon as possible . Write a java program to display.... a. Create a window class. b. Create frame within the window class. c. Extend
java class - Java Beginners
java class  How to run a java class( automatically in tomcat server for a particular time
Java Class Size
Java Class Size  How to determine size of java class
converting java class to java fx class
converting java class to java fx class   i am working on a java project which would convert text to speech and speech to text. i have developed a java file that would work for text to speech. it is working fine as a .java file
Java inner class and static nested class
Java inner class and static nested class  Java inner class and static nested class
Java inner class
Java inner class  What are inner class and anonymous class
class method in java
class method in java  How to write a class method in Java?   You must read Java - Class, Object and Methods in Java
Java adapter class
Java adapter class  What is adapter class
Java dictionary class
Java dictionary class  What is the Dictionary class
java class - Java Beginners
java class  Define a class product with the following data members 1.Product number int(Auto generated) 2.Product name char [20] 3.Price float... program to execute the above class ad functions for 5 products
Java class file
Java class file  How do i open a java class file using eclipse
Example of HashMap class in java
Example of HashMap class in java. The HashMap is a class in java collection framwork. It stores values in the form of key/value pair. It is not synchronized
java Class - Java Beginners
java Class  Can anyone please explain what this code means? import java.util.TreeMap; import java.util.Iterator; //Please tell me what this class declaration means???????????? public class ST, Val> implements Iterable
Java abstract class
Java abstract class  Can an abstract class be final
Java file class
Java file class  What is the purpose of the File class
java Math class
java Math class  Why are the methods of the Math class static
Java math class
Java math class  Can you instantiate the Math class
abstact class - Java Beginners
abstact class  write a java program to implement an animal abstact class
Java System class
Java System class  What is the purpose of the System class
java anonymous class
java anonymous class  Can an anonymous class be declared as implementing an interface and extending a class
The nested class - Java Beginners
The nested class  Hi, What is nested class in Java? What is the benefits of nested class? Write examples of nested class. Thanks   .../java/n/java-nested-class.shtml Thanks
java class - Java Beginners
java class  wts need of this code? UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());   Hi Friend, If you want to give Window look to your frame,dialog box etc,then you have to use the following
How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java
java object class methods
java object class methods  What are the methods in Object class?  There are lots of methods in object class. the list of some methods are as- clone equals wait finalize getClass hashCode notify notifyAll
java class - Java Beginners
java class  hi sir, i have to compile two classes( and and i have imported some packages in it using jar files(like Activation.jar and servlet.jar) when ever i am running in command promt
Java component class
Java component class  Which method of the Component class is used to set the position and size of a component
with out class - Java Beginners
with out class  can we write a program with out a class in core java?if yes,give example
to create a java class and methods
to create a java class and methods  How to create a java class without using the library class to represent linked lists of integers and also provide it with methods that can be used to reverse a list & append two lists.Also
Class and method question, Java?
Class and method question, Java?  Consider a Java class that you could use to get an acceptable integer value from the user. An object of this class... getValue b. implement the class in Java c. Write some Java statements that test


Advertisement null