Entrepreneurials‎ > ‎Jobs‎ > ‎Interview‎ > ‎

Interview


To read from input stream:

Scanner sc = new Scanner(System.in);

sc.close();


int[][] arr; 
int rows = arr.length;
int columns = arr[0].length
String s;
s.length()
s.substring();

int a; double b; String c       // a negative numbe will add padding on right.
String.format("%02d  %2.4f", a,b)

LinkedList<String> list = new  LinkedList<String>();
list.add();
list.remove(0);
list.size();


switch (condition) {
    case val0: 	behavior0;
                break;
    case val1:	behavior1;
                break;
    case val2:	behavior2;
                break;
    default: 	behavior;   // happens if none of the switch conditions hold, should be last. if break is not present all the rest conditions will execute.
                break;
}

char myChar = 'c'; // create char c
System.out.println("The ASCII value of " + myChar + " is: " + (int) myChar);















Comments