May 30, 2008
at
Friday, May 30, 2008
Labels:
Computer Science,
Java,
Thinking in Java
Posted by
Billy
Chapter: Everything is an Object
Exercise 3: (1) Find the code fragments involving ATypeName and turn them into a program that compiles and runs.
Not exactly sure what they're looking for here, but here's a simple program in Java:
public class Exercise3 {
public static void main(String[] args) {
ATypeName x = new ATypeName();
System.out.println(x.i);
}
}
class ATypeName {
int i = 5;
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment