class A { int i ; static int j; public static void main (String args[]) { i=10; j=20; Console.Write(i); Console.Write(j); } } What is the output of the given code? class Program class A { static void Main(string[] args) { method(null); } public static void method(Object o) { Console.Write("Object method"); } public static void method(String s) { Console.Write("String method"); } } ow many String objects are created by the below code? public class Test{ static void Main(string[] args){ String s = new String("Hello World"); } } What is the output of the below Java code? public class Test{ static void Main(string[] args){ Console.Write(0.1*3 == 0.3); Console.Write(0.1*2 == 0.2); } } What will be output of below code ? public class Test { static void Main(String[] args) { A a= new B(); a.method2(); } } class A{ public void method1() { Console.Write("Method1 in class A"); } } class B : A{ public void method1() { Console.Write("Method1 in class B"); } public void method2() { Console.Write("Method2 in class B"); } }
Check out your Company Bowl for anonymous work chats.