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
alekssr [168]
3 years ago
12

*/ What's wrong with this program? /* public MyProgram { public static void main(String[] args); } int a, b, c \\ Three integers

a = 3 b = 4 c = a + b System.out.println('The value of c is' + C); {
Computers and Technology
1 answer:
gulaghasi [49]3 years ago
6 0

Answer:

A lot is wrong with the program given in the question. See the corrected version below:

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        int a, b, c;</em>

<em>    //Three integers</em>

<em>    a = 3; b = 4; c = a + b;</em>

<em>        System.out.println("The value of c is " + c);</em>

<em>    }</em>

<em>}</em>

Explanation:

Errors:

1. The main method had a semi colon after it. This is wrong

2. An open brace was supposed to follow the main method

3. The declaration of the variables was supposed to end with a semi colon

4. the correct comment style is // and not \\

5. Initialization of variables was supposed to end with semi colons

6. The output statement had C and not c which is the declared and initialized variable..Java is strictly typed

7. Open and closing braces for the class and method wrongly placed

You might be interested in
To drive defensively, you should _______________.
Keith_Richards [23]
The answer is B, look ahead and keep your eyes moving
7 0
3 years ago
I need answer poooo<br>​
Fiesta28 [93]

Answer:

what is this?Are yhere any options for this question ❓

7 0
3 years ago
The function below takes a single string parameter: sentence. Complete the function to return everything but the middle 10 chara
dolphi86 [110]

Answer:

def get_middle_ten(sentence):

   ind = (len(sentence) - 12) // 2

   return sentence[ind:ind + 12]

# Testing the function here. ignore/remove the code below if not required

print(get_middle_twelve("abcdefghijkl"))

print(get_middle_twelve("abcdefghijklmnopqr"))

print(get_middle_twelve("abcdefghijklmnopqrst"))

7 0
3 years ago
What does the opacity effect do
coldgirl [10]

Opacity is the extent to which something blocks light. You can change the opacity of layers, filters, and effects so that more (or less) of the underlying image shows through.

6 0
3 years ago
Read 2 more answers
Which position most commonly runs routes in order to catch a pass?.
pochemuha
The position sis she commonly dish’s sayhabwueuc. sisjeuwbwbeudus
8 0
2 years ago
Other questions:
  • Kumar was working on his term paper and had not saved his work before the battery died on his laptop. He panics because the pape
    12·1 answer
  • Your computer running Windows 7 is doing some very strange things with the operating system. You are fairly certain it is not a
    10·1 answer
  • Which person would be the best fit for a career in the Information Technology field?
    14·2 answers
  • A company wants to inform a select list of it's regular customers about a flash sale. Which type of platform will it use to send
    9·1 answer
  • What are the characteristics of a severe storm
    12·1 answer
  • What is the difference between the byte and short data types in Java?
    7·1 answer
  • Draw
    7·1 answer
  • An MP3 player is an example of which of the following types of computer
    5·1 answer
  • Define foreign employment​
    5·1 answer
  • // This pseudocode is intended to describe
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!