Multiple Choice Question

Quiz Guidelines

 

QID: 
458
Question: 

Given:

class Triangle{    
public int base;    
public int height;    
public double area = 0;        
public Triangle(int base, int height){        
this.base = base; 
this.height = height;        
updateArea();    }    
public void updateArea(){        
double a = base*height/2;        
area = a;    }    
public void setBase(int b){
 base  = b; updateArea(); }    
public void setHeight(int h){ 
height  = h; 
updateArea(); } } 

Which variables are not accessible from anywhere within given class code (except from where they are declared)?

Select 1 option 

A. base, height, area 
B. area, b, h 
C. base, height 
D. b, h, a

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!