public class Test { public static void main(String ar[]) { Integer a = 10; Integer b =10; Integer c = 145; Integer d = 145; System.out.println(a==b); System.out.println(c==d); } }
7 10853solve this is my problem byte a=40,byte b=50 both add value is 90 this is with in range of byte... byte range is -128to 127.... why this pgm gives error like type mismatch.... package javapgms; public class byte1 { public static void main(String args[]) { byte a=40,b=50; byte c=a+b; System.out.println(c); } } note : dont use int k... a,b,c are in byte range... mind it..
2 5305Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
5 7140In collection sorting comparable and comparator interface will be used..but why this two interfaces required..two will work same purpose so why there are two interfaces instead of one?when to use comparator and when to use comparable?
1 4158
What is considered an anti pattern?
What is difference between == and === in js?
What are loops in java? What are three types of loops?
What is string args [] in java?
What is main in java?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
How hashmap increases its size in java?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is the main purpose of java?
Explain the use of sublass in a java program?
do I need to use synchronized on setvalue(int)? : Java thread
What is the epoch date?
What is the use of :: in java?
What is java and its types?
How do you calculate square roots?