Section 1

Preview this deck

Given an integer variable count, write a statement that displays the value of count on the screen. Do not display anything else on the screen -- just the value of count.

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (15)

Section 1

(15 cards)

Given an integer variable count, write a statement that displays the value of count on the screen. Do not display anything else on the screen -- just the value of count.

Front

System.out.println(count);

Back

The import statement needed to use JOptionPane is

Front

import javax.swing.JOptionPane;

Back

The rules that govern the correct order and usage of the elements of a language are called the_______ of the language

Front

syntax

Back

Rearrange the following code so that it forms a correct program that prints out the letter Q:

Front

public class Q { public static void main(String[] a) { System.out.println("Q"); } }

Back

Assume that message is a String variable. Write a statement to display its value on standard output.

Front

Back

Two variables , num and cost have been declared and given values : num is an integer and cost is a double . Write a single statement that outputs num and cost to standard output . Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character . Do not output any thing else.

Front

System.out.println(num + " " + cost + "
");

Back

Write a statement that prints Hello, world to the screen.

Front

System.out.println( "Hello, world" );

Back

Declare an integer variable named degreesCelsius.

Front

int degreesCelsius;

Back

The standard name of the Java compiler is

Front

javac

Back

Write a complete program whose class name is Hello and that displays Hello, world on the screen.

Front

public class Hello { public static void main( String [] args ) { System.out.println( "Hello, world" ); System.exit( 0 ); } }

Back

Suppose your name was Alan Turing. Write a statement that would print your last name , followed by a comma, followed by a space and your first name .

Front

System.out.println( "Turing, Alan" );

Back

Declare two integer variables named profitStartOfQuarter and cashFlowEndOfYear.

Front

int profitStartOfQuarter; int cashFlowEndOfYear;

Back

A compiler translates source code into_______

Front

executable code

Back

Write a complete main method that prints Hello, world to the screen.

Front

public static void main( String [] args ) { System.out.println( "Hello, world" ); System.exit( 0 ); }

Back

Suppose your name was George Gershwin. Write a complete main method that would print your last name , followed by a comma, followed by a space and your first name .

Front

public static void main( String [] args ) { System.out.println( "Gershwin, George" ); System.exit( 0 ); }

Back