int a=10,b=20,c=30 a= b+c;b=a+c;c=a+b;
System.out.println("The value is"+a+b+c;
Answers were Sorted based on User's Feedback
Answer / manju
(I tried this pgm)
It will give compilation error(like insert ') ' )
if u insert that bracket and then run ,the answer will be
102030.(bcz its treated only as strings)
| Is This Answer Correct ? | 1 Yes | 2 No |
how can you catch multiple exceptions in java?
Howmany classes that package java.applet.* contains?
How to make a read-only class in java?
What is method Overloading in the perspective of OOPS?
How does the garbage collector works in java?
Explain the polymorphism principle?
What is the format of Inner Class after it compiled?
What are the main differences between notify and notifyAll in Java?
Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }
why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all classes na. then what is the need of importing java.awt.event.*; ?
What are encapsulation, inheritance and polymorphism?
Same common question what is Map,Set,HashMap,List????