What will be the output of the following Java program?
class area
{
int width;
int length;
int height;
area()
{
width = 5;
length = 6;
height = 1;
}
void volume()
{
volume = width * height * length;
}
}
class cons_method
{
public static void main(String args[])
{
area obj = new area();
obj.volume();
System.out.println(obj.volume);
}
}
a) 0
b) 1
c) 25
d) 30
Answer: d
Related Posts
The database environment has all of the following components except:
Related fields in a database are grouped to form a
A logical schema
The language used in application programs to request data from the DBMS is referred to as the
NULL is
In case of entity integrity, the primary key may be
In an E-R diagram attributes are represented by
Join The Discussion