Absolute Java Plus MyLab Programming with Pearson eText -- Access Card Package (6th Edition)
6th Edition
ISBN: 9780134243931
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 1, Problem 20STE
Program Plan Intro
The
int result = 11;
result /= 2;
System.out.println("result is " + result);
Program Plan:
Write the code in code editor.
Run the program.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What is the output produced by the following code? int result = 11; result /= 2; System.out.println("resu lt is " + result);
What is the output of the following code:
int main()
{
test1();
test1();
return 0;
}
void test1 ()
{
static int x=2;
int y = 8;
cout<<x<<" "<<y<<endl;
x+=2;
y++;
}
What will be the output?int a = 4, b =7, c;
c = a == b;
print("%d",c);
Chapter 1 Solutions
Absolute Java Plus MyLab Programming with Pearson eText -- Access Card Package (6th Edition)
Ch. 1 - If the following statement were used in a Java...Ch. 1 - Give a statement or statements that can be used in...Ch. 1 - Write a complete Java program that uses to output...Ch. 1 - What is a compiler?Ch. 1 - What is a source program?Ch. 1 - What is an object program?Ch. 1 - What do you call a program that runs Java...Ch. 1 - Suppose you define a class named NiceClass in a...Ch. 1 - Prob. 9STECh. 1 - Prob. 10STE
Ch. 1 - Can a Java program have two different variables...Ch. 1 - Give the declaration for two variables called feet...Ch. 1 - Give the declaration for two variables called...Ch. 1 - Prob. 14STECh. 1 - Prob. 15STECh. 1 - Prob. 16STECh. 1 - Convert each of the following mathematical...Ch. 1 - What is the output of the following program...Ch. 1 - What is the output produced by the following lines...Ch. 1 - Prob. 20STECh. 1 - Given the following fragment that purports to...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following?
Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following?
Ch. 1 - Prob. 28STECh. 1 - Prob. 29STECh. 1 - What is the output of the following two lines of...Ch. 1 - Suppose sam is an object of a class named Person...Ch. 1 - The following code is supposed to output the...Ch. 1 - Prob. 33STECh. 1 - What is the output produced by the following Java...Ch. 1 - What is the normal spelling convention for named...Ch. 1 - Write a line of Java code that will give the name...Ch. 1 - Body Mass Index (BMI) helps in specifying the...Ch. 1 - The video game machines at your local arcade...Ch. 1 - Write a program that starts with the string...Ch. 1 - A government research lab has concluded that an...Ch. 1 - Write a program that starts with a line of text...Ch. 1 - Write a program for calculating the simple...Ch. 1 - Write a program that outputs the number of hours,...Ch. 1 - The following program will compile and run, but it...Ch. 1 - A simple rule to estimate your ideal body weight...Ch. 1 - Scientists estimate that roughly 10 grams of...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- What would be the output of the following code?a= [1 0 2] ; b = [3 0 7] ; c=a.*b;arrow_forwardWhat is the printout of the following code? int[][] numbers = {{1}, {1, 2}, {1, 2, 3}};System.out.print(numbers.length + ", " + numbers[1].length); A. 3, 1 B. 1, 3 C. 3, 3 D. 3, 2arrow_forwardtrace the following code and give the output. for (int value =3; pow (2, value) <=100; value++) cout << pow (2, value) << ": ";arrow_forward
- What is the output of the following?int count = 3;while (--count > 0)cout << count << " ";arrow_forwardWhat is the output of the following code segment? Int a= 3, b= 4 if (a>b) write (“up”); else writeline(“down”); A:up B: updown C: down D: nothingarrow_forwardWhat is the output produced by the following lines?System.out.println(2 + " " + 2);System.out.println(2 + 2);arrow_forward
- What will be the values of x and y after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; y += 20; } x = _____________________ y = _______________________arrow_forwardWhat is the output of the following code snippet?int main(){int num1 = 10;int num2 = 5;int num3 = 200;num3 = num3 % (num1 * num2);cout << num3 << endl;return 0;}a) 0b) 4c) 10d) There will be no output due to a run-time error.arrow_forwardWhat is the output of the following code? def main(): x = do_something(3) y = do_something(x) print(x + y) def do_something(a): x = a - 1 b = a * 2 return b main()arrow_forward
- What is the output of the following code? int x = 30;int[] numbers = new int[x];x = 60;System.out.println("x is " + x);System.out.println("The size of numbers is " + numbers.length);arrow_forwardWhat will be displayed as a result of executing the following code? int x = 5, y = 16; x *= 5; y += 4; System.out.println("num1 = " + x + ", num2 = " + y); Select one: a. x+y b. num1 = 5, num2 = 4 c. num1+num2 d. num1 = 25, num2 = 20arrow_forwardWhat is the output of the following code? int x = 0; if (x < 4) { x = x + 1; } cout<< x;arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,