You are not logged in.

#1 2016-01-20 06:38:40

Muhammad
User RankUser RankUser RankUser RankUser RankUser Rank
بِسمِ اللَّهِ الرَّحمٰنِ الرَّحيمِ
From: Sahiwal Division
Registered: 2012-03-22
Posts: 22,197
Website

What is the output of this program?

Java Quizzes Java Language Input Output

Question:
What is the output of this program?
 

import java.io.*;
    class files {
        public static void main(String args[]) {
            File obj = new File("/java/system");
            System.out.print(obj.getAbsolutePath());
        }
    }

Note: file is made in c drive.

Option A):
/java/system
Option B):
java
Option C):
java/system
Option D):
system

Correct Answer is Option A):
/java/system

Explanation:
Note: file is made in c drive.


Online Web Tutorials And Interview Questions With Answers Forum:
https://globalguideline.com/forum/

2016-01-20 06:38:40

Advertisement
Ads By Google

Re: What is the output of this program?



\n

Board footer