java open file

Java
try{
  File f=new File("C:\\demo\\demofile.txt");
}catch(Exception e){
 	e.printStackStace(); 
}
Source

Also in Java: