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]
4 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]4 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
In addition to MLA, what are some other widely used style guides? Check all that apply.
Lostsunrise [7]
APA and Chicago manual of style :D
6 0
3 years ago
Read 2 more answers
Information taken directly from an existing classified source and stated verbatim in a new or different document is an example o
kvv77 [185]

This is known as information extraction.

4 0
3 years ago
Which operating system introduced new features such as virtual memory and
EleoNora [17]

it was a Macintosh which was released by Apple may 13th 1991.

6 0
3 years ago
At what depth does an employer need to use a protection system to ensure the safety of workers in a trench or excavation?
nevsk [136]
Trench 4 foot or deeper and must be located 25 foot within eachother
3 0
3 years ago
Read 2 more answers
For this exercise, you are going to write your code in the FormFill class instead of the main method. The code is the same as if
LiRa [457]

Answer:

  • Explanation:How many grams are in 5.4 moles of iron (III) sulfate, Fe2(SO4)3?<u>⇔⇔∉↑·</u><em><u>ПНПёП</u></em><u>сж</u>

ЫЫЫЁ

Explanation:

  • Explanation:How many grams are in 5.4 moles of iron (III) sulfate, Fe2(SO4)3?<u>⇔⇔∉↑·</u><em><u>ПНПёП</u></em><u>сж</u>

ЫЫЫЁ

7 0
3 years ago
Other questions:
  • Which statement below correctly differentiates between frames and bits? Frames have more information in them than bits. Frames a
    10·2 answers
  • __________ ensures that the individual is who they claim to be (the authentic or genuine person) and not an imposter.
    15·1 answer
  • All of these are required categories on a safety data sheet except
    14·2 answers
  • The _______________ is a priority-ordered list of the other carrier networks and frequencies it should search for when it cannot
    6·1 answer
  • As long as users refer to files in the ____ directory, they can access the files without entering the absolute filename.
    10·1 answer
  • Programmers compile a list of instructions to build their applications. These instructions are typically grouped into units of c
    10·1 answer
  • Uuhdcnkhbbbbhbnbbbbnnnnnnnnnfddjkjfs
    14·1 answer
  • Write a program that computes how much each person in a group needs to pay (after tax and tip) when splitting the bill equally.
    5·1 answer
  • Write a query that returns the first name of a student whose last name is "Patil" and is in the Ravenclaw house.
    9·1 answer
  • What effect have computers had on your life?​​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!