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 program:
class Number
{
int x;
void store(Number num)
{
num.x++;
}
}
class MainNumber
{
public static void main(String args[ ])
{
Number n = new Number();
n.x = 10;
n.store(n);
System.out.println(n.x);
}
}
What is the output?
 



Print Flashcards
Create Your Own Flash Cards


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