Which one is not primitive data type: Boolean, String, double, char List two relational operators and two logical operators Are the following expressions True or False(assume x = 10) (x > 10 || (x-5) !=5) (x - 2) 0 Write loop in Java syntax to repeat reading input if user input x is not between 0 and 25. What will be the value of x and sum after the following code is executed? Int x = 0, sum = 0; while (x 2) angel +=10; else angle +=15; Solution 1) String is a class 2) Relational Operator : equal to operator (=) and greater than equal to (>=) Logical Operator : && (AND) operator, || (OR operator) 3) x=10 a) (x>10 || (x-5)!=5) here first check x>10 i.e. 10>10 which is false then check (x-5)!=5 i.e (10-5)!=5 => 5!=5 which is false now combine the complete equation false || false which is false b) (x-2) <=8 && x>0 (x-2) <=8 i.e. (10-2)<=8 which is 8<=8 which results in true x>0 i.e. 10>0 which is true now combine the complete true && true which is true 4) do { System.out.println(\"Enter the value of x\"); } while(0<x<25); 5) x=0, sum=0 while loop will iterate till x<5 i.e x=0,1,2,3,4 and the expression will add the values of x (sum=sum+x) and x++ increases the value by 1 hence 1) x=0 : sum=sum+x i.e. sum = 0+0; sum=0 2) x=1 : sum =sum +x i.e sum = 0+1; sum= 1 3) x=2 : sum =sum +x i.e sum = 1+2; sum= 3 2) x=3 : sum =sum +x i.e sum = 3+3; sum = 6 2) x=4 : sum =sum +x i.e sum = 6+4; sum = 10 At the end value of x will be 5 and sum will be 10 6) for(x=0;x<5;x++) { sum=sum+x; } 7) here int len = str.length() will calculate the length of str which is 18 so System.out.println(len) will print 18. System.out.println(str.charAt(3)); this will check character at index 3 which is l. System.out.println(str.subString(len-4)); this function will fetch substring from str so it will return 1201 O/P 18 l 1201 8) here str = str+\"E\" , this will append E to the str whcih is starting with H and the loop iterate for count = 0, 1 count = 0 i.e str= str+\"E\" i.e HE count = 1i.e. str = str = \"E\" i..e HEE now it exits the loop now str = str+ \"LP\" hence str becomes HEELP O/P : HEELP 9) user enters the value angle = 5 now check conditions one by one if(angle>5) i.e. 5>5 which is false else if (angle>2) angle= angle+10 i.e. 5>2 whcih is true hence angle becomes 5+10 hence after the code execution angle becomes 15 .