Exercise 3-2 (ATypeName)
Chapter_3 Exercise_3-1 | Exercises_3-3,4 |
Exercise 3-2 TCS, p. 85
Exercise 3-2. Find the code fragments involving ATypeName and turn them into a program that compiles and runs.
ATypeName.cs TCS, p. 55
public class ATypeName
{
public static void Main()
{
ATypeName a = new ATypeName();
}
}
/*
mcs ATypeName.cs
// 1 warning: var 'a' value never used
mono ATypeName.exe
*/
Note:
public class ATypeName {}
will not compile in C#, although it does compile (but does not run) in Java (see
Exercise_3-3 on the
Thinking_in_Java_blog.)
Chapter_3 Exercise_3-1 | BACK_TO_TOP | Exercises_3-3,4 |
Comments
Post a Comment