Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

if you can give me all answer so that answer my question. give me all answer.make sure the answer is 100% correct thanks in advanced

image text in transcribed

image text in transcribed

image text in transcribed

if you can give me all answer so that answer my question.

give me all answer.make sure the answer is 100% correct

thanks in advanced

11. Which line of code marked by the following 1 2 3 4 comment has an error? ( ) public class Test{ public static void main(String args[]){ int m=12; int n=12; int number=100+'w'; W/1 switch(number){ case 12: n++; 1/2 case 100: 1 1/3 break; case n: m++ 1/4 } } } A.1 B.2 C.3 D.4 Which f the following methods is an overloaded method of public void getSelect(int x)? 12. A.void get (float x) C. int getSelect (inty) B.double getSelect (int x, int y) D.void get int x, int y)) 13. For the following code: Sting strl ="MyString" String str2 = "MyString" String str3 = new String("MyString"); StringBuffer str4 = new StingBuffer("MyString") which conclusion is correct? () A. strl= =st12 B. strl= =gt4 C. str2= =str3 D. str3= =str4 14. The Output is 0 public class Test{ public static void main(String args[ D int al }={1,2,3,4); int b[ ]={100,200,300): a=b; System.out.println(a[1]); // Output) } } A. 1 B.2 C. 100 D. 200 15. Which of the following statements about interfaces in Java is wrong?( ) A. One interface can inherit multiple interfaces B.A class can implement multiple interfaces C. When an abstract class implements an interface, it must implement all the methods declared in the interface D. When an abstract class implements an interface, it may not implement all the methods declared in the interface 16. Which of the following is wrong?) A. Chinese characters can appear in the identifier B. int [][ ]a={{1,2,3), (4,5,6,7}}; the value of a[O].length is 3, the value of a[1].length is 4 C. int a=08; 18. D. boolean yes=true: is the correct boolean variable declaration 17. Which of the following statements is correct? ( ) A. The interface contains the implementation code of the specific method B. Interfaces and abstract classes are the same thing. C. Abstract classes can instantiate objects. D. If a class wants to implement an interface, the "implements" keyword is used. What is the execution result of the following program? Where x=4, y=0) public static void divide(int x, int y){ by{ int z=x/y; } catch(Exception z){ System.out.println("Exception");} finally System.out.println("Finally"); }} A. Print Exception finally B. Print Finally C. Print Exception D. No output 19. Which of the following options defines a valid abstract class? ( ) A. public abstract final class Car (abstract void move0:} B. public class abstract Car (abstract void move0:} C. public abstract class Car (abstract void drive :) D. public abstract class Car (abstract void drive ()} 20. When using super and this keywords, the following description is correct ( ) A. Use super 0) in the subclass constructor method to invoke the construtor method of its parent class, super must be written in the first line, otherwise the compilation will not pass B. this and super can appear in a constructor at the same time C. super and this O do not have to be placed in the first line of the constructor D. this ) and super can be used in a static environment, including static methods and static statement blocks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions