Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TEST;
- public class quiz1 {
- public static void main(String[] args) {
- // Boolean b1 = new Boolean("false");
- // boolean b2;
- // b2 = b1.booleanValue();
- // System.out.println(" "+!b2);
- // System.out.println(" "+b1);
- // if (!b2) {
- // b2 = true;
- // System.out.print("x \n");
- // }
- // if (b1 && b2)
- // {
- // System.out.print(" y ");
- // }
- // System.out.println("z ");
- // int KILO = 125;
- // int LOAD = KILO++;
- // int FINAL = 200%LOAD/3*(14%9-3)/3+3;
- // KILO += LOAD*3;
- // System.out.printf("LOAD-=%d \nkilo=%x\nfinal=%o\n",LOAD,KILO,FINAL);
- //
- // int val =1;
- // do {
- // val++;
- // //System.out.println("val: " + val);
- // ++val;
- // //System.out.println("val: " + val);
- // }while (val++ > 25);
- //
- // System.out.println("val: " + val);
- // int arr[][]= new int [4][];
- // arr [0]= new int[1];
- // arr[1] = new int[2];
- // arr [2]= new int[3];
- // arr[3] = new int[4];
- //
- // int i, j, k =0 ;
- // for (i = 0; i<4; i++) {
- // for (j=0; j<i+1; j++){
- // arr[i][j] = k;
- // k++;
- // }}
- // for (i = 0;i< 4 ; i++) {
- // for( j = 0; j< i + 1; j++) {
- // System.out.print(" " + arr[i][j]);
- // k++;}
- // System.out.println();
- // }
- String x = null;
- givenMeAString(x);
- System.out.println(x);
- }
- public static void givenMeAString (String y){
- y = "Hello World";
- }}
- package TEST;
- public class quiz {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- // float f1[ ], f2[ ];
- // f1 = new float[11];
- // f2 = f1;
- // System.out.println("F2[0] = " + f2[5]);
- System.out.println("value = " +switchit (1));
- }
- public static int switchit(int x)
- {
- int j = 1;
- switch (x)
- {
- case 1: j++;//1
- case 2: j++;//2
- case 3: j++;//3
- case 4: j++;//4
- case 5: j++;break;//5
- //System.out.println("value5 = " +j);
- default: j++;
- System.out.println("value def= " +j);
- }
- //System.out.println("value ret= " +(j+(++x)) +x +j);
- return ++j + (x*3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement