当前位置:网站首页>Tcp/ip test questions (4)
Tcp/ip test questions (4)
2022-06-25 18:55:00 【9JiuJiu】
301、 For the same message , Objects can have different behaviors , This is what is called a feature of a class ?( )
A. inheritance B. encapsulation C. polymorphism D. Abstraction
302、 The key words used to introduce package statements are :( )
A.import B.abstract C.package D.extends
303、 Applet , When leaving contains Applet Will be called when you return to the home page of ( ) Method .
A.start( ) B.init( ) C.destroy( ) D.stop( )
304、 The following pairs Java The wrong description of inheritance in is ( )
A. A subclass can only have one parent B. A subclass can be a parent of another subclass
C. Subclasses can access private properties of the parent class D. The subclass inherits the method access permission of the parent class
305、 Which loop executes the loop body statement at least once before the conditional expression is evaluated ?( )
A.do-while loop B.for loop C.while loop D. None of the above
306、 Define an array String[] a={“ab”,“abc”,“abcd”,“abcde”}, Array a[1] refer to ( ).
A.ab B.abc C.abcde D. An array
307、 If you want the component to move from left to right , Auto layout interface from top to bottom , Which layout should be used ?( )
A. No, B.BorderLayout C.FlowLayout D.GridLayout
308、 The following statement is correct ( )
A. The final class can have subclasses in special cases B. An abstract class can only have one subclass
C. Polymorphism can be achieved through method rewriting and method overloading D. Abstract classes cannot declare member variables and member methods , Only abstract methods can be declared
309、 The correct method to access a class in the following statement is :( )
A.book.name B.book.name( ) C.book->name D.book_name
310、 Which of the following options is a class Pen Construction method of ( )
A.public void Pen() {} B.public static Pen() {}
C.public Pen() {} D.public static void Pen() {}
311、 The event triggered by clicking the menu is ?( )
A. ActionEvent B.ItemEvent C.MouseEvent D. KeyEvent
312、 About try/catch/finally Structure exception capture and handling , It's wrong to say ( )
A.try Part of it is necessary B.catch Part is also necessary C. There can be multiple catch part D.finally Part is also necessary
313、 The following about JDBC The wrong description is ( ).
A.JDBC By a group Java The programming language is composed of classes and interfaces .
B.JDBC The program can automatically SQL Statement to the corresponding database management system .
C.JDBC API A two-tier model that can only support database access .
D.JDBC It's a kind of bottom layer API, It can call directly SQL sentence , It is also a high-level structure API sum
314、 The key used to declare the package statement is ( )
A.package B.import C.new D.String
315、Java The parameters are divided into ( ).
A. Formal parameters and actual parameters B. Private and public parameters C. Basic types and pointer types D. Classes and objects
316、Java In the program , Use import、class and package The correct order of the answers is ( ).
A.package、import、class B. import、package、class C. class、import、package D.package、class、import
317、 After the container is resized , The size of components in the container of which layout manager does not change with the size of the container ?( )
A.CardLayout B.BorderLayout C. FlowLayout D.GridLayout
318、 Which of the following is not Java Basic data types for ( )
A.int B.Boolean C.float D.char
319、 Method composition is divided into ( )
A. Declaration part and method body part B. Class and object parts C. Parameter list section and modifier section D. The static part and the dynamic part
320、22、 Access modifier ( ) Indicates that a method or class in a class is private .
A. private B. public C.protected D.static
321、 The following about Applet "Is correct ( )
A.Applet Also needed main B.Applet Must inherit from java.awt.Applet C.Applet Local access D.Applet The program does not need to be compiled
322、paint() What type of parameter does the method use ?( )
A.Graphics B.Graphics2D C.String D.Color
323、 Which of the following options is to create an ID that has “ close ” Text box statements ?( )
A. JTextField b=new JTextField(“ close ”); B. JTextArea b=new JTextArea(“ close ”);
C. JButton b=new JButton(“ close ”); D. JCheckBox b=new JCheckBox(“ close ”);
324、 In order to enable the user to input the student gender through selection , The best choice to use the selection component is ( )
A. JComBox B. JCheckbox C.JRadioButton D. JList
325、 About JDK、JRE and JVM Description of , The right is ?( )
A.JRE It contains JDK,JVM It contains JRE B.JRE It contains JDK,JDK It contains JVM
C.JDK It contains JRE,JVM It contains JRE D.JDK It contains JRE,JRE It contains JVM
326、 Which of the following is not int Type literal ?( )
A.20 B.077 C.\u03A6 D.0xABBC
327、 Which of the following does not belong to Java The basic data types of language ?( )
A.int B.String C.double D.boolean
328、 There are now five statements :
Line1: int _hi=6;
Line2:int d o l l a r s = 8 ; L i n e 3 : i n t L i n e 4 : i n t b i g = I n t e g e r . g e t l n t e g e r ( " 7 " ) ; L i n e 5 : i n t a r e a l l y r e a l l y r e a l l y l o n g v a r i a b l e n a m e = 5 ; which That's ok nothing Law through too Ed translate ? ( ) A . L i n e 1 B . L i n e 3 C . L i n e 4 D . L i n e 5329 、 surface reach type : d o u b l e d = 1 − 2 / 5 ∗ 5 + 2 ∗ 5 ; d Of value yes which term ? ( ) A . 10.92 B . 9.96 C . 9 D . 11330 、 generation code slice paragraph : S t r i n g s = " 123 " ; S t r i n g s 1 = s + 456 ; please ask s 1 Of junction fruit yes which term ? ( ) A . 123456 B . 579 C . Ed translate wrong By mistake D . shipment That's ok when throw Out different often 331 、 has know Count Group a r r a y , Its most after One individual element plain Of Next mark yes ? ( ) A . a r r a y . l e n g t h B . a r r a y . l e n g t h ( ) − l C . a r r a y . s i z e − l D . a r r a y . l e n g t h − 1332 、 by take Count Group m y A r r a y Of Long degree from 3 Change by 6 , present Mining take With Next Ed code : i n t [ ] m y A r r a y = n e w i n t [ 3 ] ; m y A r r a y = n e w i n t [ 6 ] ; generation code Of board That's ok after , With Next Syria Statement which term yes just indeed Of ? ( ) A . Count Group m y A r r a y Of Long degree has from 3 Change by 6 , Its in front 3 individual element plain Of value No change , after 3 individual element plain Of value by empty . B . Count Group m y A r r a y Of Long degree has from 3 Change by 6 , Its in front 3 individual element plain Of value lose loss , after 3 individual element plain Need to be Again the too first beginning turn after only can send C . Count Group m y A r r a y Of Long degree no Yes change turn . D . Count Group m y A r r a y Of Long degree has from 3 Change by 6 , primary Come on 3 individual element plain Of value whole Ministry lose loss . 333 、 Next Column Yes Turn off class 、 Yes like and real example Of Syria Statement , just indeed Of yes which One term ? ( ) A . class Just yes Yes like , Yes like Just yes class , real example yes Yes like Of another One individual name call , 3、 ... and person no Yes Bad other B . Yes like yes class Of smoke like , class yes Yes like Of have body turn , real example yes Yes like Of another One individual name call C . class yes Yes like Of smoke like , Yes like yes class Of have body turn , real example yes class Of another One individual name call D . class yes Yes like Of smoke like , Yes like yes class Of have body turn , real example yes Yes like Of another One individual name call 334 、 Next Column class A c c o u n t Of structure build Fang Law in , The sound bright just indeed Of yes ? ( ) A . A c c o u n t ( S t r i n g n a m e ) B . A c c o u n t ( S t r i n g n a m e ) C . A c c o u n t ( n a m e ) D . N e w A c c o u n t ( S t r i n g n a m e ) 335 、 Such as fruit Want to want One individual class No can By ren What class Following bearing Of word , Need to be want send use which individual Turn off key word Come on repair Decoration The class ? ( ) A . a b s t r a c t B . n e w C . s t a t i c D . f i n a l 336 、 present Yes p u b l i c c l a s s P a r e n t t p u b l i c v o i d c h a n g e ( i n t x ) ) p u b l i c c l a s s C h i l d e x t e n d s P a r e n t / / cover cover Father class c h a n g e Fang Law Next Column which individual The sound bright yes just indeed Of cover cover 了 Father class Of c h a n g e Fang Law ? ( ) A . p r o t e c t e d v o i d c h a n g e ( i n t x ) B . p u b l i c v o i d c h a n g e ( i n t x , i n t y ) C . p u b l i c v o i d c h a n g e ( i n t x ) D . p u b l i c v o i d c h a n g e ( S t r i n g s ) 337 、 Next Column Yes Turn off smoke like class Of Syria Statement just indeed Of yes which term ? ( ) A . smoke like class in One set contain Yes smoke like Fang Law B . smoke like class Of The sound bright One set package contain a b s t r a c t Turn off key word C . smoke like class Both can By real example turn also can By Following bearing D . smoke like class in only can package contain smoke like Fang Law , No can package contain real body Fang Law 338 、 surface reach type " h e l l o " i n s t a n c e o f S t r i n g return return Of value yes which term ? ( ) A . t r u e B . f a l s e C . 1 D . 0339 、 J a v a language said in different often Of branch class yes which term ? ( ) A . shipment That's ok when different often and Ed translate when different often B . suffer check different often and Ed translate when different often C . wrong By mistake and different often D . wrong By mistake and shipment That's ok when different often 340 、 Turn off On t r y . . . c a t c h . . . f i n a l l y junction structure , Sketch Statement just indeed Of yes which term ? ( ) A . t r y most Less Yes One individual c a t c h B . t r y most many Yes One individual c a t c h C . most Less Yes One individual f i n a l l y D . most many Yes One individual f i n a l l y 341 、 Qi dynamic One individual Line cheng Of Fang Law yes which term ? ( ) A . j o i n ( ) B . r u n ( ) C . s t a r t ( ) D . s l e e p ( ) 342 、 by 了 from writing Ben writing Pieces of in By That's ok read take Inside Rong , Should be The send use which individual It's about The reason is flow Yes like ? ( ) A . B u f f e r e d R e a d e r B . B u f f e r e d W r i t e r C . B u f f e r e d I n p u t S t r e a m D . B u f f e r e d O u t p u t S t r e a m 343 、 Set close A P I in S e t Pick up mouth Of , spot yes which term ? ( ) A . No Permit xu heavy complex element plain , element plain Yes along order B . Permit xu heavy complex element plain , element plain nothing along order C . Permit xu heavy complex element plain , element plain Yes along order D . No Permit xu heavy complex element plain , element plain nothing along order 344 、 L i s t Pick up mouth Of , spot yes which term ? ( ) A . No Permit xu heavy complex element plain , element plain nothing along order B . No Permit xu heavy complex element plain , element plain nothing along order C . Permit xu heavy complex element plain , element plain Yes along order D . Permit xu heavy complex element plain , element plain nothing along order 345 、 stay J a v a in , negative responsibility Yes word section code Explain Interpretation of the Of board That's ok Of yes ( ) . A . Garbage Rubbish return closed device B . virtual quasi machine C . Ed translate device D . many Line cheng machine system 346 、 Next Column Sketch Statement in , just indeed Of yes ( ) A . J a v a cheng order Of m a i n Fang Law have to Must be Write stay class in Noodles . B . J a v a cheng order in can With Yes many individual m a i n Fang Law . C . J a v a cheng order in class name have to Must be And writing Pieces of name One sample . ( p u b l i c repair Decoration Of only Yes this want seek ) D . J a v a cheng order Of m a i n Fang Law in Such as fruit only Yes One strip language sentence , can With No use ( Big enclosed Number ) enclosed rise Come on . 347 、 Next Column Sketch Statement in , just indeed Of yes ( ) A . J a v a in Of mark knowledge operator yes District branch Big Small Write Of B . Source writing Pieces of name And p u b l i c class name can With No phase Same as C . J a v a Source writing Pieces of expand exhibition name by . j a r D . J a v a Source writing Pieces of in p u b l i c class Of Count Objective No limit 348 、 Next Column Turn off On J a v a in change The amount life name gauge Fan Of Sketch Statement in , just indeed Of yes ( ) A . change The amount from word mother 、 Next draw Line 、 Count word 、 dollars=8; Line3: int %opercent=9; Line4: int big=Integer.getlnteger("7"); Line5: int a_really_really_really_long_variable_name=5 ; Which line cannot be compiled ?( ) A.Line1 B.Line3 C. Line4 D. Line5 329、 expression :double d = 1-2/5*5+2*5;d What is the value of ?( ) A.10.92 B.9.96 C.9 D.11 330、 code snippet : String s="123"; String s1=s+456; Excuse me, s1 The result is which ?( ) A.123456 B.579 C. Compile error D. Throw an exception at runtime 331、 Known array array, The subscript of the last element is ?( ) A. array.length B. array.length()-l C. array.size-l D. array.length-1 332、 For the array myArray Length from 3 Change it to 6, The following code is adopted : int[]myArray=new int [3]; myArray=new int[6]; After code execution , Which of the following statements is true ?( ) A. Array myArray The length of has been determined by 3 Change it to 6, The top 3 The values of the elements remain unchanged , after 3 The value of an element is null . B. Array myArray The length of has been determined by 3 Change it to 6, The top 3 Values of elements are missing , after 3 Elements need to be initialized before they can be initialized C. Array myArray There is no change in the length of . D. Array myArray The length of has been determined by 3 Change it to 6, original 3 The values of all elements are lost . 333、 The following related classes 、 Description of objects and examples , Which one is right ?( ) A. Class is object , An object is a class , An instance is another name for an object , There is no difference between the three B. An object is an abstraction of a class , Class is the materialization of an object , An instance is another name for an object C. A class is an abstraction of an object , An object is the embodiment of a class , An instance is another name for a class D. A class is an abstraction of an object , An object is the embodiment of a class , An instance is another name for an object 334、 The following classes Account In the construction method of , The statement is correct ?( ) A.Account (String name){}B.Account (String name) C.Account (name){}D.New Account (String name){} 335、 If you want a class that cannot be inherited by any class , Which keyword do you need to use to decorate this class ?( ) A. abstract B. new C. static D. final 336、 existing public class Parentt public void change (int x){} ) public class Child extends Parent{ // Override parent class change Method } Which of the following statements is correct to override the parent class change Method ?( ) A. protected void change (int x){} B. public void change(int x, int y){} C. public void change(int x){} D. public void change(String s){} 337、 Which of the following statements about abstract classes is correct ?( ) A. Abstract classes must contain abstract methods B. The declaration of an abstract class must contain abstract keyword C. Abstract classes can be instantiated and inherited D. Abstract classes can only contain abstract methods , Cannot contain entity methods 338、 expression "hello" instance of String What is the returned value ?( ) A.true B.false C.1 D.0 339、Java What is the classification of exceptions in language ?( ) A. Runtime and compile time exceptions B. Checked exception and compile time exception C. Errors and exceptions D. Errors and runtime exceptions 340、 About try...catch...finally structure , Describe what is correct ?( ) A.try At least one catch B.try There is at most one catch C. At least one finally D. There is at most one finally 341、 What is the method to start a thread ?( ) A.join() B. run() C.start() D.sleep() 342、 In order to read the contents line by line from the text file , Which processing flow object should be used ?( ) A. BufferedReader B. BufferedWriter C. BufferedInputStream D. BufferedOutputStream 343、 aggregate API in Set What are the characteristics of the interface ?( ) A. Duplicate elements are not allowed , The elements have order B. Allow repeating elements , Elements out of order C. Allow repeating elements , The elements have order D. Duplicate elements are not allowed , Elements out of order 344、List What are the characteristics of the interface ?( ) A. Duplicate elements are not allowed , Elements out of order B. Duplicate elements are not allowed , Elements out of order C. Allow repeating elements , The elements have order D. Allow repeating elements , Elements out of order 345、 stay Java in , Responsible for the execution of bytecode interpretation is ( ). A. Garbage collector B. virtual machine C. compiler D. Multithreading mechanism 346、 In the following description , The right is ( ) A.Java programmatic main Methods must be written in the class . B.Java There can be more than one in the program main Method . C.Java The class name in the program must be the same as the file name .(public Only those who decorate have this requirement ) D.Java programmatic main If there is only one statement in the method , Don't have to {}( Curly braces ) Cover up . 347、 In the following description , The right is ( ) A.Java Identifiers in are case sensitive B. Source file name and public Class names can be different C.Java The source file extension is .jar D.Java In the source file public There is no limit to the number of classes 348、 The following about Java In the description of variable naming conventions , The right is ( ) A. Variables are made up of letters 、 Underline 、 Numbers 、 dollars=8;Line3:intLine4:intbig=Integer.getlnteger("7");Line5:intareallyreallyreallylongvariablename=5; which That's ok nothing Law through too Ed translate ?()A.Line1B.Line3C.Line4D.Line5329、 surface reach type :doubled=1−2/5∗5+2∗5;d Of value yes which term ?()A.10.92B.9.96C.9D.11330、 generation code slice paragraph :Strings="123";Strings1=s+456; please ask s1 Of junction fruit yes which term ?()A.123456B.579C. Ed translate wrong By mistake D. shipment That's ok when throw Out different often 331、 has know Count Group array, Its most after One individual element plain Of Next mark yes ?()A.array.lengthB.array.length()−lC.array.size−lD.array.length−1332、 by take Count Group myArray Of Long degree from 3 Change by 6, present Mining take With Next Ed code :int[]myArray=newint[3];myArray=newint[6]; generation code Of board That's ok after , With Next Syria Statement which term yes just indeed Of ?()A. Count Group myArray Of Long degree has from 3 Change by 6, Its in front 3 individual element plain Of value No change , after 3 individual element plain Of value by empty .B. Count Group myArray Of Long degree has from 3 Change by 6, Its in front 3 individual element plain Of value lose loss , after 3 individual element plain Need to be Again the too first beginning turn after only can send C. Count Group myArray Of Long degree no Yes change turn .D. Count Group myArray Of Long degree has from 3 Change by 6, primary Come on 3 individual element plain Of value whole Ministry lose loss .333、 Next Column Yes Turn off class 、 Yes like and real example Of Syria Statement , just indeed Of yes which One term ?()A. class Just yes Yes like , Yes like Just yes class , real example yes Yes like Of another One individual name call , 3、 ... and person no Yes Bad other B. Yes like yes class Of smoke like , class yes Yes like Of have body turn , real example yes Yes like Of another One individual name call C. class yes Yes like Of smoke like , Yes like yes class Of have body turn , real example yes class Of another One individual name call D. class yes Yes like Of smoke like , Yes like yes class Of have body turn , real example yes Yes like Of another One individual name call 334、 Next Column class Account Of structure build Fang Law in , The sound bright just indeed Of yes ?()A.Account(Stringname)B.Account(Stringname)C.Account(name)D.NewAccount(Stringname)335、 Such as fruit Want to want One individual class No can By ren What class Following bearing Of word , Need to be want send use which individual Turn off key word Come on repair Decoration The class ?()A.abstractB.newC.staticD.final336、 present Yes publicclassParenttpublicvoidchange(intx))publicclassChildextendsParent// cover cover Father class change Fang Law Next Column which individual The sound bright yes just indeed Of cover cover 了 Father class Of change Fang Law ?()A.protectedvoidchange(intx)B.publicvoidchange(intx,inty)C.publicvoidchange(intx)D.publicvoidchange(Strings)337、 Next Column Yes Turn off smoke like class Of Syria Statement just indeed Of yes which term ?()A. smoke like class in One set contain Yes smoke like Fang Law B. smoke like class Of The sound bright One set package contain abstract Turn off key word C. smoke like class Both can By real example turn also can By Following bearing D. smoke like class in only can package contain smoke like Fang Law , No can package contain real body Fang Law 338、 surface reach type "hello"instanceofString return return Of value yes which term ?()A.trueB.falseC.1D.0339、Java language said in different often Of branch class yes which term ?()A. shipment That's ok when different often and Ed translate when different often B. suffer check different often and Ed translate when different often C. wrong By mistake and different often D. wrong By mistake and shipment That's ok when different often 340、 Turn off On try...catch...finally junction structure , Sketch Statement just indeed Of yes which term ?()A.try most Less Yes One individual catchB.try most many Yes One individual catchC. most Less Yes One individual finallyD. most many Yes One individual finally341、 Qi dynamic One individual Line cheng Of Fang Law yes which term ?()A.join()B.run()C.start()D.sleep()342、 by 了 from writing Ben writing Pieces of in By That's ok read take Inside Rong , Should be The send use which individual It's about The reason is flow Yes like ?()A.BufferedReaderB.BufferedWriterC.BufferedInputStreamD.BufferedOutputStream343、 Set close API in Set Pick up mouth Of , spot yes which term ?()A. No Permit xu heavy complex element plain , element plain Yes along order B. Permit xu heavy complex element plain , element plain nothing along order C. Permit xu heavy complex element plain , element plain Yes along order D. No Permit xu heavy complex element plain , element plain nothing along order 344、List Pick up mouth Of , spot yes which term ?()A. No Permit xu heavy complex element plain , element plain nothing along order B. No Permit xu heavy complex element plain , element plain nothing along order C. Permit xu heavy complex element plain , element plain Yes along order D. Permit xu heavy complex element plain , element plain nothing along order 345、 stay Java in , negative responsibility Yes word section code Explain Interpretation of the Of board That's ok Of yes ().A. Garbage Rubbish return closed device B. virtual quasi machine C. Ed translate device D. many Line cheng machine system 346、 Next Column Sketch Statement in , just indeed Of yes ()A.Java cheng order Of main Fang Law have to Must be Write stay class in Noodles .B.Java cheng order in can With Yes many individual main Fang Law .C.Java cheng order in class name have to Must be And writing Pieces of name One sample .(public repair Decoration Of only Yes this want seek )D.Java cheng order Of main Fang Law in Such as fruit only Yes One strip language sentence , can With No use ( Big enclosed Number ) enclosed rise Come on .347、 Next Column Sketch Statement in , just indeed Of yes ()A.Java in Of mark knowledge operator yes District branch Big Small Write Of B. Source writing Pieces of name And public class name can With No phase Same as C.Java Source writing Pieces of expand exhibition name by .jarD.Java Source writing Pieces of in public class Of Count Objective No limit 348、 Next Column Turn off On Java in change The amount life name gauge Fan Of Sketch Statement in , just indeed Of yes ()A. change The amount from word mother 、 Next draw Line 、 Count word 、 The symbols are formed at will .( The number can't start ) B. Variables cannot start with a number .
C.A and a stay java Is the same variable . D. Different types of variables , You can have the same name .
349、 Of the following options , No Java The legal identifier is ( )
A. VOID B. x3x C. final D. abc$def
350、 stay Java When a class is defined , The keyword used is ( ).
A.class B.public C.struct D.class or struct
351、 The following is the correct order of precedence for operators ( )
A. From high to low :()、!、 Arithmetic operator 、 Relational operator 、 Logical operators 、 Assignment operator ;
B. From high to low :()、 Relational operator 、 Arithmetic operator 、 Assignment operator 、!、 Logical operators ;
C. From high to low :()、 Arithmetic operator 、 Logical operators 、 Relational operator 、!、 Assignment operator ;
D. From high to low :()、!、 Relational operator 、 Assignment operator 、 Arithmetic operator 、 Logical operators ;
352、 expression (15+38)/4%3 The value of is ( )
A. 0 B. 1 C. 2 D. 39
353、 Known characters A Corresponding ASCII The code value is 65, So the expression "A" + 1 The value of is ( )
A.、66 B. B C. A1 D. Illegal expression , Compilation error
354、 The following about for The description of the loop is correct ( )
A. for In cyclic body sentences , It can contain more than one statement , But enclose it in curly braces .
B. for The cycle can only be used when the number of cycles has been determined .
C. stay for In circulation , Out of commission break Statement out of loop .
D. for Loop is to execute the loop body statement first , Condition judgment after .
355、 The following statements about loops are correct ( ).
A.for A loop cannot produce an dead loop . B.while A loop cannot produce an dead loop .
C.for Loops cannot be nested while loop . D. Even if the conditions are not met do……while The statements in the loop body are also executed at least once .
356、 The following about Java What is true about automatic type conversion in ( )
A. Basic data types and String The result must be a string .
B. char The type and char The result of type addition must be char type . C. double Type can be automatically converted to int.
D. char + int + double +“” The result must be double.
357、 In the following options , The correct form of array initialization is ( ).
A.int t1[][]={ {1,2},{3,4},{5,6,7}}; B.int t2[3][2]={1,2,3,4,5,6};
C.int t3[3][]={1,2,3,4,5,6}; D.int t4[][2]={1,2,3,4,5,6};
358、 set up x and y Are all int Type variable , Then the following statement :x=x+y; y=x-y; x-=y; The function is ( ) .
A. hold x and y Arrange from large to small B. hold x and y Arrange from small to large C. No definite result D. In exchange for x and y The value in
359、 Assuming that define int a=9^3; that a What's the value of ?( )
A.3 B.10 C.12 D.27
360、 Assuming that define int a=9&3; that a What's the value of ?( )
A.1 B.3 C.6 D.12
361、 stay Java in , The following description of the construction method is correct ( ).
A. Class must explicitly define the constructor . B. The return type of the constructor is void.
C. Constructors and classes have the same name , And it can't take any parameters . D. A class can define multiple constructors .
362、 stay Java in , The following statement about the construction method is correct ( )
A. Constructor must have same name as class . B. Each class must declare its own constructor .
C. Constructor cannot be overloaded . D. A subclass cannot call the constructor of a parent class .
363、 The following about Java The description of the construction method in is wrong ( )
A. The name of the constructor must be the same as the class name . B. The construction method can take parameters . C. Constructor cannot be overloaded . D. A constructor must not have a return value .
364、 The following about Java The description of the construction method in is correct ( )
A. Constructors in classes cannot be omitted . B. A constructor in a class must have the same name as the class name , Other methods cannot have the same name as the class name .
C. Constructor is only called when the object is created , That is, only through new Keyword to invoke execution .
D. A class can only define one constructor .
365、 The following options are about Java What is wrong with the statement encapsulated in ( ).
A. Encapsulation is about privatizing properties , Provide public methods to access private properties .
B. The access methods for properties include setter Methods and getter Method .
C. setter Method for assignment ,getter Method is used to take values .
D. All classes that contain attributes must encapsulate attributes , Otherwise, it cannot be compiled .
366、 Use Java Implement encapsulation , The first step is to modify attribute visibility to restrict access to attributes , The second step is to create assignment and value taking methods , For access to attributes , The third step should be ( ).
A. Access properties using assignment and value methods . B. Write general methods to access properties .
C. In assignment and value taking methods , Add access restrictions to properties . D. To write main Method to create an object , Call the assignment and retrieval methods to access the properties .
367、 stay Java In language , The following description of class inheritance , The right is ( ).
A. A class can have multiple direct parents . B. A class can have multiple subclasses .
C.、 Subclasses can use all the methods of the parent class . D. A subclass must have more member methods than a parent class .
368、Java in , Which of the following keywords is not an access modifier ( )
A.public B.protected C.package D.private
369、 The following options are about Java in this The correct description of the keyword is ( )
A. this A keyword refers to a reference to itself within an object . B. this Keyword can refer to the object of the parent class in the class .
C. this Keywords are associated with classes , Not associated with a specific object . D. Different objects of the same class share the same this.
370、 The following about Java in super The correct description of the keyword is ( ).
A. super Keyword refers to the reference of its parent class object inside the child class object .
B. super Keywords can not only refer to the direct parent of a subclass , It can also refer to the parent of the parent class .
C. Subclass through super Keyword can only call the method of the parent class , Instead of calling the properties of the parent class .
D. Subclass through super Keyword can only call the properties of the parent class , Instead of calling the methods of the parent class .
371、 In the following description , The right is ( ).
A.final Modifiable class 、 attribute 、 Method . B.abstract Modifiable class 、 attribute 、 Method .
C. Defining an abstract method requires the return type of the method 、 name 、 Parameter list and method body .( There is no method body )
D. use final Decorated variable , The value of this variable can be changed in the program .
373、 To distinguish multiple overloaded methods of a class , The following description of these methods is correct ( ).
A. Use different parameter lists . B. The return value type is different . C. When calling, prefix the class name or object name . D. Different parameter names .
374、 About Java in static The key word is wrong ( )
A static Can modify methods . B static You can modify member variables .
C static Code blocks can be decorated . D static The method of decoration , Non static class member variables can be accessed inside the method .
375、 The following statement about modifiers is wrong ( ).
A.abstract Cannot be associated with final To modify the same class in parallel . B.abstract Class cannot have private Members of .
C.abstract Methods cannot be in ordinary classes , Must be in abstract Class . D.static Method cannot handle non static Properties of .
376、 The following description of abstract classes is correct ( )
A Abstract classes must contain abstract methods , Otherwise it's a mistake . B The class containing the abstract method must be an abstract class .
C Abstract methods can have no method bodies , You can also have a method body . D Subclasses of abstract classes must not be abstract classes .
377、Java in , Which of the following keywords prevents a class from deriving subclasses .( )
A.final B.public C.private D.protected
378、 The following statements about abstract classes and interfaces are wrong ( )
A. Abstract class Java What language expresses is a kind of inheritance relationship , A class can only have one direct parent class . But a class can implement multiple interfaces . B. There can be no abstract methods in an abstract class .
C. All methods in the interface must be added public keyword .
D. The variables defined in the interface default to public static final type , And must give its initial value , So you can't redefine it in your implementation class , Can't change its value .
379、 About interfaces 、 Abstract classes and ordinary classes , The following statement is wrong ( )
A. Abstract classes can have abstract methods, while ordinary classes cannot have abstract methods .
B. Methods in an abstract class can be partially implemented, while all methods in an interface are declared but not implemented .
C. A normal class can inherit an abstract class while implementing multiple interfaces . D. Interfaces cannot define variables .
380、 About abstract classes and interfaces , The following statement is correct ( )
A. An interface is an abstract class , There is no difference between them . B. Abstract classes can be declared using , Interfaces cannot be declared for use .
C. Abstract classes and interfaces cannot be instantiated . D. None of the above is true .
381、 The following about Java The wrong thing about interfaces is ( ).
A. One Java An interface is a collection of method characteristics , But there is no implementation of the method .
B.Java The methods defined in the interface are implemented in different places , Can have completely different behavior .
C.Java Interface can declare private members .
D.Java Interface cannot be instantiated .
382、 stay Java Constants are defined in the interface , The following syntax error is ( ).
A.static int MALE = 1; B.final int MALE = 1; C.int MALE = 1; D.private int MALE = 1;
383、 stay Java Class , Which of the following declaration statements can define public int Type constant MAX.( )
A.public int MAX = 100; B.final int MAX = 100;
C.public static int MAX = 100;D.public static final int MAX = 100;
384、 stay Java In the following statements , Can put the MAX_LENGTH Defined as a constant , And the assignment is 99.98 Yes. ()
A.public final MAX_LENGTH = 99.98; B.public final float MAX_LENGTH = 99.98;
C.public double MAX_LENGTH = 99.98; D.public final double MAX_LENGTH = 99.98;
385、 The following description of inner classes , The wrong is ( )
A. The name of the inner class can be the same as the name of the class that defines it B. Internal classes are available abstract modification
C. Inner classes can be members of other classes D. An inner class can access the members of its own class
386、 Use interface When declaring an interface , The following modifiers can modify the interface ( ).
A.private B.protected C.public D. All of the above
387、 About private access control characters private Modified member variables , The following statement is correct ( )
A. Can be used by the class itself 、 Other classes in the same package as it and subclasses of that class in other packages access .
B. Can only be accessed by the class itself and all subclasses of the class C. Can only be accessed and modified by the class itself . D. Can only be accessed by classes in the same package .
388、 Here's about Object What's wrong with the class statement is ( ).
A. All classes inherit directly or indirectly from Object class . B. Interfaces also inherit Object class .
C.Object Class toString() Method . D.Object Class in java.lang In bag .
389、 stay Java in ,Object Class is the father of all classes , The default extension of user-defined class is from Object class , In the following ways ,
Which is not in Object Class .( )
A. equals() B. getClass() C. toString() D. trim()
390、 hypothesis S1 and S2 It's two strings . The following statements have no errors at compile and run time ( ).
A.String s3 = s1 +s2; B.boolean b = s1.compareTo(s2);C.char c = s1[0];D.char c = s1.charAt(s1.length());
391、 sentence "Compution".substring(2, 4) The return value of ( )
A.mp B.mpu C.mput D.mpution
392、 In the following methods , Which is not String Class provides legitimate methods .( )
A. equals() B. trim() C. append() D. indexOf()
393、String、StringBuffer Can't be inherited , Which modifier are they all decorated by .( )
A.static B.final C.abstract D.private
394、 The following about String and StringBuffer "Is correct ( )
A.String The operation string does not change the contents of the original string B.StringBuffer The connection string speed is not String fast C.String have access to append Method concatenates strings D.StringBuffer stay java.util In bag
395、Math.round(15.5) and Math.round(-15.5) How much are they equal to ?( )
A.15,-15 B.15,-16 C. 16,-15 D.16,-16
396、Math.floor(15.5) and Math.floor(-15.5) How much are they equal to ?( )
A.15,-15 B.15,-16 C. 16,-15 D.16,-16
397、Math.ceil(15.5) and Math.ceil(-15.5) How much are they equal to ?( )
A.15,-15 B.15,-16 C. 16,-15 D.16,-16
398、 Which of the following is not System Methods ( )
A.exit() B.getTime() C.gc() D.currentTimeMillis()
399、 stay Java in , Create date class Date object , The packages that need to be imported in the program are ( ).
A.java.text. ; B.java.date.* ; C.java.util.* ; D. No additional import packages are required , It exists in the default package java.lang in
400、 stay JAVA in , Which of the following options is the object of the class with the key - Value to store data .( )
A. java.util.List B. java.util.ArrayList C. java.util.HashMap D. java.util.LinkedList
answer :CAACA BCCBC | ADCAA ACDAA | DAACD CBBDA | DDDAD CBAAA | CADCB AABCA | AACAD AADBA | DACCD CBCAA | AADB ACDC | CDDDA CCBDA | ACBAC BCBBC
边栏推荐
- Class 02 loader subsystem
- Guangzhou Sinovel interactive VR panorama brings development to all walks of life
- RMAN backup database_ catalogue
- mysql视图讲解
- Elastic high-performance computing on the cloud supports the rapid development of the life science industry, reducing costs and increasing efficiency
- [deeply understand tcapulusdb technology] create a game area for document acceptance
- JVM | runtime data area (heap space)
- 网络安全检测与防范 测试题(二)
- In 2021, China's private equity market is growing, and the scale of private equity fund management reaches 19.78 trillion yuan [figure]
- Analysis on development scale and development trend of China's night economy industry in 2021 [figure]
猜你喜欢
Anaconda download Tsinghua source
焕新出发,利尔智达天下
05 virtual machine stack
Analysis on the development trend of China's intense pulsed light equipment industry in 2021: the market scale is growing, and the proportion of imported brands is large [figure]
Use pagoda to set up mqtt server
Ruffian Heng embedded semimonthly issue 57
Analysis on planting area, output and import of sugarcane in Guangxi in 2021: the output of sugarcane in Guangxi accounts for 68.56% of the total output of sugarcane in China [figure]
Sorting out the latest data mining competition scheme!
Analysis of China's medical device industry development environment (PEST) in 2021: the awareness of medical care is enhanced, and the demand for medical device products is also rising [figure]
[in depth understanding of tcapulusdb technology] business guide for creating doc acceptance
随机推荐
[in depth understanding of tcapulusdb technology] how to realize single machine installation of tmonitor
Training of long and difficult sentences in postgraduate entrance examination day90
[today in history] June 25: the father of notebook was born; Windows 98 release; First commercial use of generic product code
How to sort massive data? How to process data between memory and hard disk?
R language plot visualization: plot visualization of two-dimensional histogram contour (basic 2D histogram contour)
06 local method interface
R language uses the model of DALEX package_ The profile function interprets the relationship between a continuous feature and the target value Y in multiple classification models based on the conditio
SVN介绍及使用总结
QQ robot epidemic situation query / epidemic situation concern [latest beta2 version]
mysql视图讲解
On location and scale in CNN
Training of long and difficult sentences in postgraduate entrance examination day92
Why are life science enterprises on the cloud in succession?
158_模型_Power BI 使用 DAX + SVG 打通制作商業圖錶幾乎所有可能
2017 reading (word memory)
LeetCode-78-子集
Tiger DAO VC产品正式上线,Seektiger生态的有力补充
Under what circumstances do you need to manually write the @bean to the container to complete the implementation class
Analysis on development scale and development trend of China's night economy industry in 2021 [figure]
Analysis on employment compensation of 2021 college graduates: the average monthly starting salary of doctors, masters, undergraduates and junior colleges is 14823 yuan, 10113 yuan, 5825 yuan and 3910