Trending ▼   ResFinder  

ICSE 2007 solved : Computer Applications

25 pages, 8 questions, 0 questions with responses, 0 total responses,    0    0
Manasa Preethi
Sikkim manipal university, Bangalore
Master of Science Information Technology
+Fave Message
 Home > manumansi >

Formatting page ...

ICSE 2007 Q1. (a) Name two types of Java programs. [2 marks] A1. (a) Applications and Applets. Q1. (b) Define instance variable. Give an example of the same. [2 marks] A1. (b) An instance variable is a non-static variable of a class, not defined inside any method of that class. It has a separate value for each object created of that class. In the example below, c.gears is an instance variable of object c, belong to class Car. class Car { int gears; // instance variable public Car() // constructor { this.gears = 5; } public static void main(String[] args) { Car c = new Car(); System.out.println( c.gears ); }

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2024 ResPaper. Terms of ServiceContact Us Advertise with us

 

manumansi chat