<$BlogRSDUrl$>

Monday, June 04, 2007

What would happen when tried to compile and run this program?

public class StaticVar
{
void execute(String b){
static String str;
str = b;
}

public static void main( String[] args ) {
StaticVar var = new StaticVar();
var.execute( "blah");
}
}
1. Compilation Error
2. Runtime Error.
3. Compiles and Runs with no errors.

Answer : 1

Labels:


This page is powered by Blogger. Isn't yours?