MCQs > IT & Programming > Java > Output of the following program? class string_class { public static void main(String args[]) { String obj = 'hello'; String obj1 = 'world'; String obj2 = obj; obj2 = ' world'; System.out.println(obj + ' ' + obj2); } }

Java MCQs

What is the output of the following program?

class string_class
    {
        public static void main(String args[])
        {
            String obj = "hello";
            String obj1 = "world";  
            String obj2 = obj;
            obj2 = " world";
            System.out.println(obj + " " + obj2);
        }
    }


Answer

Correct Answer: hello world

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it