posted 16 years ago
Hello Ranchers,
I have 2 questions
1. From a mock exam
Which of the following statements will create a file called test.txt in your current directory?
1. File f = new File("test.txt");
2.FileOutputStream fos = new FileOutputStream("test.txt");
3.RandomAccessFile raf = new RandomAccessFile("test.txt", "r");
4.RandomAccessFile raf = new RandomAccessFile("test.txt", "rw");
Given answer is 2 and 4.
My question is
FileOutputStream deosn't create a file right?It throws FileNotFound exception if the doesn't exist.
2. char \u0063='\u0063';
the above declaration is valid but how?
how \u0063 is considered as valid identifier?
Please can anybody explain this??
Thank you in advance