java operator

2024. 6. 6. 15:52영어/java

반응형

 

Operator

1) multiplication

use '*'

ex) 5 * 5 = 25

 

2) addition

use '+'

ex) 5 + 5 = 10

 

3) subtraction

use '-'

ex) 5 - 5 = 0

 

4) modulus

ex) 10 % 3 = 1

 

The number operated on by an operator is called an operand. A literal is a specific data value that appears directly in the source code.

if you want to practice hands-on. use jshell to practice it.

if you don't know how to use jshell, then check this link. 

https://just-do-it-man.tistory.com/173#google_vignette

 

JShell

usually, python programmer is easy to learn pathon. because they can learn it with python shell. That's why python is easy to learn From java 9, java is equally easy to learn - JShellJShell is java REPL(Read Eval Print Loop) Let's learn this hands-on.go

just-do-it-man.tistory.com

 

 

 

 

 

 

in Java, when you perform operations with integers, the result is an integer. However, when you perform operations with floating-point numbers, the result is a floating-point number.

 

In Java, when you perform arithmetic operations with integer operands, the result is an integer. For example:

int a = 10; 
int b = 3; 
int result = a / b; // result is 3, not 3.33

In this case, a and b are integers, so the result of the division is also an integer, and any fractional part is discarded.

On the other hand, when you perform arithmetic operations with floating-point operands, the result is a floating-point number. For example:

double x = 10.0; 
double y = 3.0; 
double result = x / y; // result is 3.3333333333333335

Here, x and y are floating-point numbers (doubles), so the result of the division is also a floating-point number, preserving the fractional part.

===================================================================================

hands-on 실습의, '직접 해보는
thereby 그렇게 함으로써
have documented 과거부터 현재까지 특정 사실이나 정보를 기록하거나 문서화해왔다
by the end of this course 이 과정이 끝날 즈음에
pursue "추구하다", "쫓다", "추진하다
java object oriented programming 객체지향 프로그래밍(OOP)
fundamental 근본[본질]적인, 핵심적인,기본 원칙[법칙], 핵심
do a deep dive 깊이 있는 조사를 하다
multiplication 곱셈
break problem 문제를 깨다
Break it down "세분화하다", "단계별로 나누다", "자세히 설명하다
and so on 기타등등
cakewalk 식은 죽 먹기
Terminology 특정 분야에서 사용되는 전문 용어
operator 연산자
operand 피연산자
subtraction 빼기

반응형

'영어 > java' 카테고리의 다른 글

JShell  (0) 2024.05.30
Installing java(windows)  (0) 2024.05.30