調べログ

Java中間テスト用暗記シート

code-2620118_640

皆さんご機嫌いかがでしょうか。明後日がJavaの試験なので暗記シートを作ったのでこれを明日中に覚えたいなと思います。本当であれば、コーディングやmultiple questionならここまで苦労しないのですが、教授が理論を中心にテストに出すと明言しているので論述対策です。なんだか文系に戻ったみたいです。暗記シートは以下の通りです。

   
reserved words:

Reserved words are identifiers that have
a special meaning in programming language and can only be used in predefined
ways.

Reserved words cannot be used for any
other purpose, such as naming a class or method,

The example of reserved words are class,
public, static, void, if, private, double, boolean and so on.

 

   
data type:

A designation that specifies a set of
values (which may be infinite.) Each Java variable has a data type that specifies
the kinds of value that can be stored on it.

 

   
Type casting:

Casting is the most general form of
conversion in Java. If a conversion can be accomplished at all in a Java
program, it can be accomplished using a cast.

A cast is a Java operator that is
specified by a type name in parentheses.

 

   
String(character string):

A series(bunch) of ordered characters, represented
in Java using the String class and string literals such as “Hello”. It’s not a data
type.

 

   
escape sequence:

In java, a sequence of characters beginning
with the backslash character(\), used to indicate a special situation when
printing values. For example, \t specifies that a horizontal tab should be
printed.\b:backspace,\n:newline,\r:carriage return,\”: double quote, \’:single
quote, \\:doubleslash(
バックスラッシュがなぜか\に変換されるので注意。)

 

   
API: abbreviation of Application
Programming Interface. A set of classes that defines services for a programmer.
Not part of the language itself, but often relied on to perform even basic
tasks.

 

   
Class library:

A set of classes that define useful services for a programmer.

 

   
variable:

An identifier in a program that represents
a memory location in which a data value is stored.

 

   
Instantiation: The act of creating
an object from a class.

 

   
Relational operator:

Relational operators
that let us decide relative ordering between values. Greater than operator(>),
less than(<), greater than or equal to(>=)

 

   
If/if else statement:

An if statement consists of the reserved
word if followed by a Boolean expression, followed by a statement. The condition
is enclosed in parentheses and must evaluate to true or false. If the condition
is true, the statement is executed and processing continues with the next
statement. If the condition is false, the statement is skipped and processing
continues immediately with the next element.

An if-else statement allows a program to
do one thing if a condition is true and another thing if the condition is false.

 

   
Flow of control:

The order in which statements are executed
in a running program is called the flow of control. Unless otherwise specified,the
execution of a program proceeds in linear fashion. Invoking a method alter the
flow of control. When a method is called, control jumps to the code defined for
that method. When the method completes, control returns to the place in the
calling method where the invocation was made, and processing continues from
there.

Within a given method, we can alter the flow
of control through the code by using certain types of programming statements.
Statements that control the flow of execution through a method fall into two
categories
conditionals and loops.

 

   
Scope of variable:

The scope of a variable, which determines
where it can be referenced, depends on where it is declared. By being declared
at the class level(not within a method), these variables and constants can be
referenced in any method of the class.

 

   
Constructor:

A special method in a class that is invoked
when an object is instantiated from the class. Used to initialize the object.

 

   
Instance data:

Attributes such as the variable faceValue(さいころ をふって出た目) are called instance data because new memory space is reserved for
that variable every time an instance of the class is created.

 

   
scanner class:

The scanner class which is part of the
Java API, provides convenient methods for reading input values of various types
from various resources.

The scanner class can also be used to
parse a character string into separate pieces.

Scanner scan = new Scanner(System.in);

We must first create a Scanner object in
order to invoke its methods. Objects in Java are created using he new operator.
The above declaration creates a Scanner object that read s input from the keyboard.

 

   
Button:

A button object generates an action event
when it is pushed. The button’s setOnAction method is used to specify the event
handler for the button.

A Checkbox is a button hat can be toggled
on or off using the mouse, indicating that a particular condition is set or
unset. A checkbox is defined by the Checkbox classs from the JavaFX API.

A radio button is used with other radio
buttons to provide a set of mutually exclusive options. It has meaning only
when grouped with other radio buttons. Only one option in a group of radio
button is valid. A ToggleGroup object is used to create a set of mutually
exclusive radio buttons.

 

   
loop:

A loop, or repetition statement, allows us
to execute a programming statement over and over again(multiple times). Like a conditional,
a loop is based on a Boolean expression that determines how many times the statement
is executed.

Java has three types of loop statements:
the while statement, the do statement, and the for statement.



教科書はこれですが、正直難しいです。。明日はたぶんブログお休みします。。

本ブログをご覧頂き誠にありがとうございます。みなさまの支えがあってブログを継続更新できています。たまにはクリック頂けますと幸いです!


にほんブログ村


にほんブログ村

モバイルバージョンを終了