1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
musickatia [10]
4 years ago
14

What is the error and why is there an error in the code below?

Computers and Technology
1 answer:
s344n2d4d5 [400]4 years ago
8 0

Answer:

The error in the given question is that  the class xyz must be abstract i.e

abstract class xyz.

Explanation:

In the given code the class xyz contain abstact method so class xyz must be abstract because abstract class contain abstract method .Abstract class contain final variable and abstract method by default all the method in abstract class is abstract and variable are final .

Syntax:

abstract class classname

{

//final variable

// abstract method

// method

}

so coorect code is

abstract class XYZ

{  public static final int A = 9;

public abstract void foo1( );

public int foo2( )

{

return 5;

}

}

You might be interested in
PLZ HELP 20 POINTS I REALLY NEED TO GET THIS RIGHT!
DIA [1.3K]

Answer:

B. 12

Explanation:

A4=A1+2

A1=10

10+2=12

A4=12

Ihope this helps

4 0
4 years ago
You should contact your references _____ a job interview.
kykrilka [37]

Answer:

My research suggests that it is before and after.

5 0
3 years ago
Read 2 more answers
Discuss a situation in which you might want to use a floating-point number with a fractional part for a loop control variable. W
serious [3.7K]

Answer:

1. When calculating the division of each number in some range of floating type number.

2. One cannot use real numbers for exact comparison. Two real numbers are rarely equal. Real numbers are have representational errors.

Explanation:

1. In structured programming, we make use of a floating-point number with a fractional part for a loop control variable. a given scenario is when we just want to calculate the division of each number in some range of floating type number. However, the downsides to using a floating-point number with a fractional part for a loop control variable are:

  • They can cause 'off-by-one' failure
  • A floating point number cannot represent all simple fractions exactly

2. The pitfalls of using real numbers for the index variable in a for loop:

  • Two real numbers are hardly equal
  • One cannot use real numbers for exact comparison
  • The existence of representational errors
7 0
3 years ago
The graph shows the depth, y, in meters, of a shark from the surface of an ocean for a certain amount of time, x, in minutes: A
Mashutka [201]

Answer:

The graph shows the depth, y, in meters, of a shark from the surface of an ocean for a certain amount of time, x, in minutes:

A graph titled Distance Vs. Time is shown. The x axis is labeled Time in minutes and shows numbers 0, 1, 2, 3, 4, 5. The y axis is labeled Distance from Ocean Surface in meters. A straight line joins the points C at ordered pair 0,60, B at ordered pair 1, 100, A at ordered pair 2, 140, and the ordered pair 3, 180.

Part A: Describe how you can use similar triangles to explain why the slope of the graph between points A and B is the same as the slope of the graph between points A and C. (4 points)

Part B: What are the initial value and slope of the graph and what do they represent? (6 points)

Explanation:

8 0
4 years ago
What does the "zoom tool" do in Photoshop?
siniylev [52]

Answer:

A. All of the above

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • write a pseudo code and flow chart that take a number as input and prints multiplication table up to 10
    9·1 answer
  • Consider a simple application level protocol built on top of udp that allows a client to retrieve a file from a remote server re
    15·2 answers
  • What type of device is the printer?
    13·2 answers
  • This is my new horrible subject lol
    12·1 answer
  • On the Excel Ribbon, click the Data tab in the Sort & Filter Group, and then click the Sort button to conduct a _____ sort.
    8·1 answer
  • Which system is a type of artificial intelligence that uses a database, containing facts and rules, to provide assistance to use
    9·1 answer
  • Why is statistics important for business professionals in many career fields?
    13·2 answers
  • Recall the binary search algorithm.1. Using the algorithm/algorithmic environment, give pseudocode using a for loop.AnswerMy alg
    5·1 answer
  • Types of network model​
    11·1 answer
  • Whats worth more in adopt me- A Mega Owl or a Mega Frost Dragon?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!