Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock Exam Qn doubt

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I got this Qn from the site www.examulator.com

code
--------------------------------
interface Skeleton{
public char getSize(int iSize);

}


public class Huskisson implements Skeleton{
int iSize=99;
public static void main(String argv[]){
new Huskisson();
}
Huskisson(){
int iSize=1;
System.out.println(getSize(iSize));

}

public int getSize(int iSize){
return iSize;
}
}
------------------------------------------
The output is Compiler Error. I thought the output will be 1.
Can somebody explain?
 
    Bookmark Topic Watch Topic
  • New Topic