-
-
-
-
-
-
-
What is the difference between the File and RandomAccessFile classes
The File class encapsulates the files and directories of the local file system. TheRandomAccessFile class provides the methods needed to directly access data containedin any part of a file.
-
-
-
-
}
}
public class B{
public static void main(String args[])
{
A a=new A();
System.out.println(a.meth1());
}
}
The above code gives a compile error.It says cannot use void.If the return type is not void then it compiles sucessfully
what could be the reason?">Class A{public static void meth1(){System.out.println("Inside method 1");}}public class B{public static void main(String args[]){A a=new A();System.out.println(a.meth1());}}The above code gives a compile error.It says cannot use void.If the return type is not void then it compiles sucessfullywhat could be the reason?
-
-
-
-
-
-
-
Which of the following are true?
A) The Void class extends the Class class.B) The Float class extends the Double class.C) The System class extends the Runtime class.D) The Integer class extends the Number class.
-
-
Java Interview Questions
Ans