Computer Science Chapters 1 and 2

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is the parameter in the given method call? (System.out.println("welcome");)

"welcome"

Text enclosed between this and the end of the line is ignored by the compiler

//one line comment

What is the output of the following Java statement?(System.out.println(4+6);)

10

Convert the base ten number 135 into a base two number

10000111

Convert the base two number, 00010101 into a base ten number

21

compute integer arithmetic ...16/5, 16%5, 100/101, 100%101

3, 1, 0, 100

What is the output of the following Java statement?(System.out.println("4+6");)

4+6

What does that CPU do?

CPU fetches program instructions from RAM (input), interprets and processes it (execution) and then sends back the computed results so that the relevant components can carry out the instructions.

What is the Java virtual Machine and why is it important?

Java virtual machine is a program that simulates a real CPU making them platform-independent

Which one of the following memory types provides storage that persists without electricity?

Secondary storage, usually a hard disk

What is the object in the given method call? (System.out.println("welcome");)

System.out

What is the syntax for calling the println method on the object System.out?

System.out.println("Any Message");

Which statement best describes the portability characteristics of Java?

The same Java class files will run on different operating systems without change

How does a transistor relate to computer memory?

Transistors are structure elements that make up the CPUs

What is a string in Java?

an object used by the String class

The Java compiler ignores any text between _____.

backslash asterisk, asterisk backslash

Give an example of the four primitive data types

boolean, int, char, double

What does CPU stand for?

central processing unit

What term is used to refer to text in a program that helps human readers understand the program?

comment

What was Java first developed for?

consumer devices

When a Java application starts, what is the name of the method that is executed?

main

A _________contains sequence of instructions to perform a particular task

method

A method is called on what entity in the program?

object

A method may be called by specifying which 3 items in the specified order?

object, method, parameters

What entity belongs to a class and is manipulated in a program?

package

Parameters to methods are enclosed by these symbols.

parenthesis

What are the two most important benefits of the Java language?

portability and safe

What is the name of the method in the given method call? (System.out.println("welcome");)

println

In Java, every statement must end with this symbol

semicolon

What term is used to refer to a sequence of characters enclosed in quotation marks?

string

What is a compiler and what does it do?

translates high-level instructions into more detailed instructions


Conjuntos de estudio relacionados

Frequently Missed Questions for Producer Licensing Exam

View Set

Chapter 22 Check your understandings

View Set

Diuretic/ Fluid and Electrolyte Practice Questions- Pharmacology I

View Set

Project Management Cumulative Final

View Set

Unit 20. Vocab. F. Match to make sentences.

View Set