Java Programming Symbols

Ace your homework & exams now with Quizwiz!

Method

A snippet of code that performs some specific task for the programmer.

;

A statement ends here.

Public

A Java keyword which declares a member's access as visible to all other classes. This means that any other class can access the field or method.

Out

The class for output to the keyboard.

Void

The following method doesn't return a value.

{

The java block of code begins here.

Float

decimal number; used to declare a variable that can hold a 32-bit single precision

break

exit from a control structure, particularly a switch statement

print

prints just as println, but without a carriage return

a=b

value of a should be assigned to variable b

>=

Boolean for greater than or equal to

!=

Boolean for inequality

<

Boolean for less than

<=

Boolean for less than or equal to

- -

Decrements the value held in variable by one

(

An expression or parameter list begins here.

)

An expression or parameter list ends here.

==

Boolean for equality

>

Boolean for greater than

Close

Closes a file stream cleanly

String

Consists of a sequence of characteristics

New

Construct a new object of the following type and parameters

boolean

Defines a variable for the values "true" or "false" only

Class

Defines the implementation of a particular kind of object; defines instance of methods

++

Increments the value held in a variable by one

Math

Like system, a class that contains an assortment of methods.

&&

Logical operator for and

Println

Prints a string, ending in a carriage return.

a%b

Return the remainder of a divided by b

a/b

Return the value of a divided by b

a-b

Return the value of a minus b

" "

This is a string literal.

import

Used at the beginning of a source file to specify classes or entire Java packages to be referred to later without including their package names in the reference

Long

Used to declare a long interger

Int

Used to declare an interger

case

Used with a switch statement; A statement in the switch block can be labeled with one or more labels; The switch statement evaluates its expression, then executes all statements that follow the matching label;

Main

Where Java starts running the program.

Static

a java keyword denotes that a member variable, or method, can be accessed without requiring an instantiation of the class to which it belongs; it means that you can call a method, even if you've never created the object to which it belongs

if

beginning of a conditional statement.

switch

beginning of an advanced conditional statement; Used in conjunction with case and default to evaluates a variable, matches its value to a specific case, and executes the block of statements associated with that case

else

beginning of an alternative to the conditional.

true

boolean value for not false

false

boolean value for not true

b+a

the concatenation of string a onto string b; example: "high " + " school"

System

A class containing useful subclasses and methods; part of a standard output function used in java. where the term specifies the package name, "out" specifies the class name and "print" is a function in that class.

a+b

Return the value of a plus b

a*b

Return to value of a times b

Random

Returns a random number between 0 and 1.

nextDouble

Returns the next decimal entered from an input stream

nextInt

Returns the next interger entered from an input stream

nextLine

Returns the next line entered from an input stream.

Next

Returns the next space-delimited token from an input stream.

}

The java block of code block ends here.

Double

decimal number; used to declare a variable that can hold a 64-bit double precision

for

keyword to keyword is used to create a loop, which specifies a variable initialization, a boolean expression, and an incrementation.

While

keyword used to create a loop, which tests a boolean expression and executes the block of statements associated with the loop if the expression evaluates to true; this continues until the expression evaluates to false

Scanner

like system, a class that contains an assortment of methods; this class is a class in java.util, which allows the user to read values of various types

!

logical operator for not

l l

logical operator for or


Related study sets

topic 3: Money Growth and Inflation

View Set

Quiz 3 - (review document and quiz)

View Set

MCAT Missed Q's on Test 10/17/2020

View Set

Unit 3 Early Empires in the Near East

View Set

A&P CH10 Nervous System 2 Questions

View Set

Xcel Chapter Exam Social Security

View Set

1.4 Given a scenario, analyze potential indicators associated with network attacks

View Set

מבחנים אתר מד״א פרק החולה קורס חובשים מד״א פברואר 2017

View Set