Explain super class and sub class in java, JAVA Programming

1. In Java (and OOP), Inheritance includes the concept of super class that is parent class and sub class that is derived class. Explain What is a super class in Java? What is a sub or derived class in Java?

2. Code a simple class in JAVA classed "Student." Your class must consist of  the followings: •Variables (name, age, addressStreet, city, state, zip, country)

Setter and Getter methods

For Example:

public void setName(String name) {

this.name = name;

}

public String getName() {

return name;

}

Posted Date: 3/30/2013 2:15:16 AM | Location : United States







Related Discussions:- Explain super class and sub class in java, Assignment Help, Ask Question on Explain super class and sub class in java, Get Answer, Expert's Help, Explain super class and sub class in java Discussions

Write discussion on Explain super class and sub class in java
Your posts are moderated
Related Questions
Overall Requirements Every phone number is broken up into sections as shown below: Country Code Area Code Prefix Line Number 1 919 882 5000 Write a program to separate out a ph

Point-to-Point : gives a traditional queue based mechanism where the client application forwards a message through a queue to typically one receiving client that accepts messages

Need the following code in double var instead of integer. import javax.swing.*; public class arrayVar { public static void main (String[] args) //This is our main method prompt

public class Tester { static void test(int[] a) { int[] b = new int[2]; a = b; System.out.print(b.length); System.out.print(a.length); } public static void main(String[] arg

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is casting? There are two types of casting, casting among primitive numeric types and casting among object references. Casting among numeric types is used to convert large

Looking for: responsible, trustworthy, accountable, and knowledgeable CakePHP developer and web designer with great communication skills. I'm seeking great partnership and if th

#include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; int numtraps; main( ) { void input( void );


Determine the types of object oriented programme Classes - Prototypes for objects - Definition or a blueprint of a user-defined datatype - Think of it as a ma