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
1. It is acceptable to use a jack that has been
krok68 [10]
D. None of the above
7 0
2 years ago
What is one difference between a web page and a web application? Web pages provide information, while web applications allow the
Assoli18 [71]

Webpage is a page of a site, such as https://example.com/test, where the bolded text is the page.

On the other hand, web applications, or simply web apps, are found in many websites, such as here and also in Connexus. They end in either aspx or jsp, which stand for asp.net appx and javascript page, respectively.


So, your answer would be A: Web pages provide information, while web applications allow the user to do something.

Hope this was answer you were looking for. Have a nice day!

7 0
2 years ago
Create an array of 10 fortune cookie sayings that will be randomly displayed each time the user reloads the page. The fortune wi
vfiekz [6]

Answer:

let cookieNumber = Math.floor(Math.random() * 10)

switch (cookieNumber) {

  case 1:

   document.write('Fortune 1')

   break;

  case 2:

   document.write('Fortune 2')

   break;

   case 3:

   document.write('Fortune 3')

   break;

  case 4:

   document.write('Fortune 4')

   break;

  case 5:

   document.write('Fortune 5')

   break;

  case 6:

   document.write('Fortune 6')

   break;

  case 7:

   document.write('Fortune 7')

   break;

  case 8:

   document.write('Fortune 8')

   break;

  case 9:

   document.write('Fortune 9')

   break;

  case 10:

   document.write('Fortune 10')

Explanation:

The cookieNumber is generated using Math.random(), which is rounded to a whole number using Math.floor(). Then, a switch block is used to display a different fortune depending on the value of cookieNumber.

4 0
2 years ago
Which best compares and contrasts visual and performing arts? Both careers use communication skills; however, people involved in
Vlad1618 [11]

Answer:

Both careers speak to an audience; however, people involved in the performing arts speak only to a live audience.

Explanation:

sorry im late but im not sure

3 0
3 years ago
Read 2 more answers
Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
Grace [21]

Answer

calculator calc;

Explanation

An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.

4 0
3 years ago
Read 2 more answers
Other questions:
  • You work for a large enterprise company that handles time-sensitive information. Your supervisor has asked that you set up a con
    8·1 answer
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 100. Follow each number w
    8·1 answer
  • When transporting data from real-time applications, such as streaming audio and video, which field in the ipv4 header can be use
    14·1 answer
  • In this question, you must create a function in C++ using an external editor. When satisfied with your work, you shall attach it
    10·1 answer
  • PLEASE HELP ME ASAP!!!!
    11·1 answer
  • This week you will learn about basic code structure. The term structure, as it relates to programming, refers to the decisions y
    14·1 answer
  • What is the full from of CPU?​
    5·2 answers
  • Write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space
    13·1 answer
  • What does command do
    5·1 answer
  • Need help asap please
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!