javascript
Brief description  about Online courses   join in Online courses
View vindya Ballenahally Nagaraju 's Profile

i am not getting output for this, can you plz tell me whats wrong

class Person {
int age;
String qualification;

void Age(int value) {
age = value;
}

void Qualification(String string) {
qualification = string;
}
void PrintInfo( ) {
System.out.println("the age of the person is " age);
System.out.println("the qualification of the person is " qualification);
}
}
class SoftwareEngineer extends Info
{

}

class MyInfo {
public static void main ( String args[] ) {
Person i = new Person( );
SoftwareEngineer p = new SoftwareEngineer( );

p.Age(30);
p.Qualification("B.E in CSE");
p.PrintInfo( );
}
}

Asked by vindya Ballenahally Nagaraju | Dec 14, 2010 |  Reply now
Replies (2)
View vindya ballenahally nagaraju 's Profile
thanks :)
Dec 15, 2010
View akhmad durdibayevich qutlimuratov 's Profile
u have to put "+" sign between string and value,
here:
System.out.println("the age of the person is " + age);
System.out.println("the qualification of the person is " + qualification);
Dec 14, 2010