Programming Debugging Quiz

Ace your homework & exams now with Quizwiz!

Which symbol means "not equal to"?

!=

Which is an example of a int ?

2

Variable names can start with a number. True or False?

False

He is the developer of Java Programming Language

James Gosling

A variable that holds true or false

boolean

If J=true and K=false, what is J&&K?

false

Files containing Java source code use the file extension __________.

.java

For paragraph comment, you should use:

/*......*/

What does a comment look like in Java?

//comment

Which of the following will result in a double (1.0 + 3; 3 / 5; (int)3.0; 5 * 200)

1.0+3

We use Scanner Library in java for...

Allows the user to enter data

What makes java platform independent

Because java has its own JRE (runtime environment)

What is byte code in Java?

Code generated by a Java compiler

the process of converting Java code into byte code that can then be understood by the Java interpreter

Compiling

Modulus operator (%) can be applied to which of these?

Integers and Floating - point numbers

Which provides runtime environment for java byte code to be executed?

JVM (virtual machine)

Which company owns Java?

Oracle

All Java programming statements must end with a __________.

Semicolon

Which statement transfer execution to different parts of your code based on the value of an expression?

Switch

How do you print "Hello" in Java?

System.out.print("Hello");

What prints out "I love Java" successfully?

System.out.println("I love" + " Java");

When we want to print in Java, we use the code ......

System.out.println();

What is the purpose of a variable in Java?

Their purpose is to label and store data in memory

We use For loop ..........

To repeat a specified number of operations.

A compiler ignores whitespace between words and lines.

True

Class is another name for program in Java

True

True or False : Java is case sensitive, which means identifier Hello and hello would have different meaning in Java

True

True or false? The declaration must always be stated before assignment

True

Can an assignment statement be assigned in same line as declaration or later?

Yes

What is syntax?

a set of rules for how a language is written

a primitive data type that represents either true or false

boolean

It is an optional statement used to describe what a program or a line of program is doing.

comment

What does == represent?

comparing the equality of two values

which of the following is a function of Integrated Development Environment?

debug, compile, edit program

If J=5 and K=6, what will the output of the following code be? return J==K?

false

Which of the following is syntactically wrong (int a; int 1b; int_a; )

int 1b

Which declaration with throw an error? (String name = "1 1233 141"; double num = 1; int bigNumber = 1234567890; char random = '7';)

int bigNumber = 1234567890;

Tools that provide support for software development process including editors and debuggers are called

integrated development environments

All Java applications must have a method named __________.

main ()

if-else statement

makes a decision based on input

Which of the followings is Java code that starts from the main() method as a mandatory part of every program

public static void main (String args[])

What type of variable would you use to store $250.56

string

How is a variable assigned?

x = 2


Related study sets

Fundamentals Networking Tech Chapter 8

View Set

Health Promotion, Wellness, and Disease Prevention Test

View Set

Chapter 7: Quantum Theory & Electronic Structure of Atoms

View Set

Science Olympiad Rocks and Minerals 2018

View Set

Series 7: Part 2 Unit 5 Corporate Debt

View Set

Course 6: Sec 4 - List Segmentation and Mangement

View Set