programming overflow

Saturday, October 31, 2015

Strings in java are called by value not reference

›
Why? Because String is immutable.

Assert in java

›
public class Test2 { public static int x; public static int foo( int y) { return y * 2 ; } publi...

Output of program

›
public class Test { public static int y; public static void foo( int x) { System.out.print( "foo ...
Friday, October 30, 2015

Assert in java

›
Refer to http://www.javatpoint.com/assertion-in-java

Thread And Runnable both have run method which one will be called?

›
class MyThread extends Thread { MyThread() {} MyThread(Runnable r) { super (r); } public void run() { ...

IllegalThreadStateException

›
class MyThread extends Thread { public static void main(String [] args) { MyThread t = new MyThread(); ...

short circuit operator in java

›
class BoolArray { boolean [] b = new boolean [ 3 ]; int count = 0 ; void set( boolean [] x, int i) { x[...
‹
›
Home
View web version
Powered by Blogger.