Wang Li "Java language programming 2nd time Job (2018)" Detailed
Job Result Details
Score: 100 Selection score: 601. Expression 9==8&&3<7 The result of the operation is ()A.1b.0c.trued.false the correct answer is: D2. Expression (3>2)? 8:9 The result of the operation is ()A.3b.2c.8d.9 the correct answer is: C3. Expression 9-7<0| | Results of 11>8 operation ()a.trueb.falsec.1d.0 the correct answer is: A4. Result of expression 48%9+5*5-4 operation ()a.24b.26c.-30d.46 the correct answer is: A5. Expression 2>=5 The result of the operation is ()A.2b.5c.trued.false the correct answer is: D6. Expression 15+4*5-12 The result of the operation is ()a.15b.23c.12d.-133 the correct answer is: B7. The following () data types that are not part of a composite typeA. class B. Character type C. array D. Interface The correct answer is: B8. In Java, is not an integer type is ()A.doubleb.longc.intd.byte the correct answer is: A9. The following variable definitions, () are incorrectA.float X;y; B.float x,y=3.14f; c.public int I=100,j=2,k;d.int i=100;int j=200; the correct answer is: a10. The following options, () correctly represent an integral type constant in the Java language. a.-8.0b.1,000,000c.-30d. " 456 "The correct answer is: C11. The following procedure is executed after the conclusion is () int m=2,n=2; m+=m-=m*m; n-=n*n; n=n+n ;A.M=NB.M>NC.M<ND.M is different from n type, can not compare the correct answer is: B12. Execute the following procedure paragraph: int no; int a=19,b=8; no= (a%b>5) a+b:a-b; System.out.println (no); The output is:a.2b.9c.11d.27 the correct answer is: C13. The following statements are executed after the output is: () int E=integer.parseint ("" +3+3); System.out.println (e-2.5);a.30.5b.3.5c.332.5d.8.5 the correct answer is: A14. Define a variable of type int and have been assigned the initial value, then the valid assignment statement is ()a.a+1==4; B.a+=a*8; C.a=6.6f;d.int a=18; The correct answer is: B15. Set m, n, x, y as the assigned int variable, and the result of the following () is a non-logical value. A.m!=n&x%y<mb.m++==m+n+x+yc.++m*b--+yd.m+n>=x+y the correct answer is: C16. The variables in the following options are correctly defined and assigned an initial value, and an illegal expression is ()a.m. >= 6 = = n > 1B. ' M ' + 6C. ' M ' = 8D. ' M '% 8 The correct answer is: C17. The following identifiers, () are not validA.inter_netb.i_nongc.helod.*member the correct answer is: D18. Illegal in the following character constants is ()A. ' # ' B. ' & ' C. ' P ' D. ' embarrassing ' the correct answer is: C19. The following () is the range of values for the type int in the Java data type. a.-2<sup>7</sup>~2<sup>7</sup>-1b.0~2<sup>16</sup>-1c.-2<sup>15</ Sup>-2<sup>15</sup>-1d.-2<sup>31</sup>~2<sup>31</sup>-1 the correct answer is: D20. In the Java language, the following () type can represent an integer base data type. A.singleb.bytec.doubled.char correct answer is: B Programming question score: 402-4 is not too fat. Score: 10/10
Import Java.text.DecimalFormat; Import Java.util.Scanner;/** * @Author Liguo * @Description * @Data 2018-03-20 16:07 * *Publicclass main {public static void Main (string[] args) {Scanner in = New Scanner (System. in); int H = in.nextint (); //judgment input double result = (H-100) * Span class= "Hljs-number" >0.9 * 2; DecimalFormat df = new DecimalFormat ( "0.0"); System. out.println (Df.format (Result));}
2-1 Say hello to integers score: 10/10
Import Java.util.Scanner;/** * @Author Liguo * @Description * @Data 2018-03-20 16:13 */ Public class main {public static void Main (string[] args) {Scanner in = New Scanner (System. in); int A = in.nextint (); int B = in.nextint (); System. out.println ( "Hello," +a+ "and" +B+
2-3 averaging of integers score: 10/10
Import Java.text.DecimalFormat; Import Java.util.Scanner;/** * @Author Liguo * @Description * @Data 2018-03-20 16:21 * *PublicClassMain {PublicStaticvoidMainString[] (args) {int a[] =Newint[4];Double sum =0;double average = 0; Scanner in =new Scanner (System. in); for (int i=0; I<4;i++) {a[i] = in.nextint (); sum = sum + a[i];} //for (int J =0; j<4; J + +) //System.out.println (A[j]); DecimalFormat df = new DecimalFormat ( "0.0"); average = Double.parsedouble (Df.format (Sum/4)); System. out.println ( "sum=" + (int) sum+< Span class= "hljs-string"; Average= "+average); }}
2-5 integer Arithmetic score: 10/10
Import Java.util.Scanner;/** * @Author Liguo * @Description * @Data 2018-03-20 17:59 * *PublicClassMain {PublicStaticvoidmain (string[] args) {Scanner in = Span class= "Hljs-keyword" >new Scanner (System. in); int a = in.nextint (); int B = in.nextint (); System. out.println (A+ "+" +b+out.println (A+ "-" +b+ "=" + (A-B)); System. out.println (A+ "*" +b+out.println (A+ "/" +b+
2-3 Fahrenheit temperature conversion Celsius temperature score: 10/10
Import Java.util.Scanner;/** * @Author Liguo * @Description * @Data 2018-03-20 20:24 * *public class main { public static void main (string[] args) {Scanner in = new Scanner (System. in); double F = in.nextint (); double Celsius = 0; Celsius = 5* (F-32)/9; System. out.println ("celsius=" + (int) Celsius);}}
Java Programming Job c.njupt.edu.cn Java implementation second job