Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
5 Core Java 7209In 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 Core Java 4184