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
Which of the following is true of the 529 plan
sesenic [268]

A 529 Plan is an education savings plan operated by a state or educational institution designed to help families set aside funds for future college costs.

your answer will be: It is a tax-advantaged college savings plan.

5 0
3 years ago
Read 2 more answers
A student is helping a friend with a home computer that can no longer access the Internet. Upon investigation, the student disco
Alexxandr [17]

Answer:

Due to unreachable DHCP server

Explanation:

As we know that Dynamic Host Configuration Protocol, in short  DHCP is the network protocol which is used to central and automatic management of IP address with in the network.

So due to unreachable DHCP server a student could not able to connect with the internet.When the network connection break it means that DHCP server is offline.

So the answer is Due to unreachable DHCP server .

8 0
3 years ago
A(n) _____ is a simple database program whose records have no relationship to one another.
almond37 [142]
"flat file"

A simple database program whose records have no relationship to one another<span>single</span>
7 0
3 years ago
When you schedule an appointment, Outlook adds the appointment to the ____ folder by default.
fomenos
C. schedule.

Outlook adds your appointment to your schedule folder.
6 0
2 years ago
A network is a group of two or more computers or devices connected together. To be able to connect, they each need a
Kay [80]
D. Internet service protocol (isp)
6 0
3 years ago
Read 2 more answers
Other questions:
  • He smallest network is a ______________________, which is a network of personal devices, such as the network you use when you sy
    5·1 answer
  • Access Office Equipment has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of
    15·1 answer
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • What refrigerant has been approved for new household refrigerators and freezers
    14·1 answer
  • It is used to select specific menu options, drag and drop options and to draw something on screen.
    6·1 answer
  • Can you please help me
    9·1 answer
  • Convert alzebric expression into basic expression<br> (1/2)bh<br> PLEASE GIVE ANSWER FAST
    10·1 answer
  • Can someone be my friend,don't friend me until i ask you Questions
    14·1 answer
  • Define the term loop rule.
    13·1 answer
  • when I turn on my pc using a graphics card, it does give video, and everything is normal, but when I try to turn on my pc with t
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!