Tuesday, 31 October 2017

java full trikey output problems



Question o7:
Show the output of the following .

String i="java";
     System.out.printf("Welcome to %s\n programming",i);

Output:
Welcome to java
Programming

Question 08
Show the output of the following .
  String i="java";
     System.out.printf("Welcome to %s\n programming",i+i);

Output
Welcome to javajava
 programming

java very important output problems and solution



Question 05:
Show the output of the following .
String i="java";
     System.out.println("Welcome to "+i);

Output
Welcome to java

Question 06:
Show the output of the following .

   String i="java";
     System.out.printf("Welcome to %s",i);

Output
Welcome to java

java conceptual input output problems

java trikey problems



Question 04:
Show the output of the following .
int i=9,j=8,k=4;
System.out.println(i+j+k+"+7");
System.out.println(i*j+k+"9");
System.out.println(j*k+i*(9/2)+"+2");

Output:
21+7
769
68+2

java conceptual input output problems



Question 03
Show the output of the following .
int i=9,j=8,k=4;
System.out.println(i+k*9/2+k);
System.out.println(i+k*9.0/2+k);
System.out.println(j+k*3/3*1.0+8);

Output:
31
31.0
20.0

java important input output question with solution



Question 02
Show the output of the following
int i=9,j=8,k=4;
System.out.println(i+" j"+k);
System.out.println("i+j = "+k);
System.out.println(i+j+k);

Output
9 j4
i+j = 4
21