10 questions answer What is the output produced by the following code, programming homework help

10 questions answer What is the output produced by the following code, programming homework help

Demonstrate how to create 2 lines of code of comments with your Name and Date.

What is the output produced by the following code?

int result = 3 * 7 % 3 – 4 – 6; System.out.println(“result is ” + result);

What is the meaning of the following line in a program?

n1 = keyboard.nextInt();

What is the output produced by the following lines of program code?

int quotient = 7 / 3;

int remainder = 7 % 3;

System.out.println(“quotient = ” + quotient);

System.out.println(“remainder = ” + remainder);


What is the output produced by the following lines of program code?

char a, b;

a = ‘b’;

System.out.println(a);

b = ‘c’;

System.out.println(b);

a = b;

System.out.println(a);

Which of the following may be used as variable names in Java?

numberOfExecutions, file1, 1stDraft, myapp.java, short, TotalCount

In your Words, explain what is a method?

Is this an example of typecasting?

i = (int) (10.3 * x)

Complete the following code by completing the missing parts:

import java.util.Scanner

public class FirstProgram

{

public static void main(String[] args)

{ System.out.println(“Hello out there.”);

System.out.println(“I will add two numbers for you.”);

System.out.println(“Enter two whole numbers on a line:”);

int n1, n2;

Scanner keyboard = new Scanner(System.in);

n1 = keyboard.nextInt();

n2 = ______________; (1)

System.out.print1n(“The sum of those two numbers is”);

System.out.print1n(_________); (2)

}

}

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper