Declare a reference variable of type file named myfile.

Using java. please with detailed instructions. put comments in
the codes Thanks
(1 Declare a reference variable of type File named myFile. (2) Declare a variable named myMenu suitable for holding reference

Answer

//1
File myFile;//declaring myFile reference varaible of type File and
it is not initialized
//2
Menu myMenu[];//declaring myMenu which can hold references to Menu
objects
//3
String myString;//string reference varaible is declared
//now assigning string object to it
myString = new String(“Hello”);

Leave a Comment