What will be the output of the following Java program? [code] class string_class { public static void main(String args[])

What will be the output of the following Java program?
Code:
    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);
        }
    }
A. hello hello
B. world world
C. hello world
D. world hello
 

Tìm kiếm

Back
Top