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 13165solve 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 6280Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
5 8874In 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 4887
What are the different types of data structures in java?
What is static import?
What is the association?
Variable of the boolean type is automatically initialized as?
Which class is the superclass for all the classes?
What is the purpose of static keyword in java?
What is polymorphism in java? What are the kinds of polymorphism?
What is array sorting in java?
Can we clone singleton object?
Explain the scope of a variable.
Give me some null interfaces in java?
Can a boolean be null java?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.
Why destructor is not used in java?
Difference between == and .equals() ?