Syvum Home Page

Home > Quiz Games > Java Programming >

Java Programming : Flash Cards III


Learn Java programming through these flash cards.

Formats Worksheet / Test Paper Quiz Review
Flash Cards



Consider the following class definitions:
class Square
{
private Square() { }
int area(int side)
{
return(side * side);
}
}
class Constructor
{
public static void main(String args[ ])
{
Square S1 = new Square();
int area = S1.area(10);
System.out.println(area);
}
}
Will the code above compile and run successfully? Yes or No. Give reason, if No
.
 



Print Flashcards
Create Your Own Flash Cards


Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright