This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a final private main  RSS feed

 
John James
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm considering certification and have looked at a few mock exams. Could someone explain why the following code compiles(jdk1.3) and runs.
import java.io.*;
public class FileTester{
final private static void main(String[]args){
try{
File fi=new File("DATAbase");
FileWriter buf=new FileWriter(fi);
PrintWriter pw=new PrintWriter(buf);
pw.println("Hello2");
pw.flush();
}
catch(IOException ioe){};
}
}
Cheers
John
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!