JAva chap 1

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Write a good variable name for the current value of a stock.

currentStockVal

What does the compiler do with code placed inside of comments?

disregards it

Example of Logical error

executes, but produce incorrect results, perhaps using an incorrect formula

How do you determine the number of connection lines for a point-to-point network?

n(n-1)/2

Using Java naming convention, write a name for a class about store customers.

public class Customers

Program

public class Jk { public static void main (String[] args) { System.out.println ("Hi"); } }

Write the code for (define) the main method for a Java program

public static void main(String [] args)

What does it mean when we say that Java is a case-sensitive language? Give an example

can only use caps in certain areas Strings not allowed

Example of a a run-time error

causes a program to terminate abnormally, such as trying to divide by zero

Wan

connects 2 or more lans 30 miles away

Man

connects 2 or more lans long distance

What cycle do computers continually follow?

Fetch decode execute

What is the first step in problem solving?

Understand the problem

How are the individual pixels (points) represented in a color image?

0 and 1

What is a binary number?

0 and 1 code for letters

1 bit can be used to represent how many distinct items or values? 2 bits? 3 bits?

1-2 2-4 3-8

What is a network?

2 or more computers connected together so they can exchange info

How do you convert from decimal to binary? Binary to decimal?

2^0 2^1........

Example of syntax error

Basic Errors Spelling- symbols

What is the purpose of comments in a computer program? Name two ways you can insert a comment into a program.

Comments are to explain the purpose of the program and describe what it does // */jsjdhdjhjs*/

List 3 legal and 3 illegal Java identifiers.

Hi_pie Qo$ hi toad BO 1.3 dy

what type of programming language is Java?

High level

How is all information stored in the computer?

In binary

List some of the characteristics of the Java programming language as discussed in your textbook.

It is an object-oriented language made up of classes methods and statements

Lan

Local area network- connects over a small distance

What does the statement System.out.println do in a program?

Prints a message

Is RAM or ROM volatile? What does it mean to be volatile?

RAM- Volatile Rom- Non Vol When the power goes out everything is lost.

What are the pixle values in a color image

RGB 0,0 is in the top left corner

What is RAM

Random Access Memory

What is ROM

Read only memory

Is a Java program best classified as software or hardware?

Software

name input device name output device

in- mouse out-moniter

what is the www

it is a application that runs on the internet

Which characters are allowed as identifiers?

letters, digits, the underscore character ( _ ), and the dollar sign Identifiers have to start with a letter

Why is the binary number system used to store information on a computer?

they are inexpensive and reliable


संबंधित स्टडी सेट्स

Endocrine System and Disorders test bank

View Set

Palabras que terminan en -dad, -tad, -umbre

View Set

Prep U--Ch. 47: Mgmt of Patients With Intestinal and Rectal Disorders

View Set