SlideShare a Scribd company logo
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
class Test {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
$ javac test.java
$ java Test
Hello world!
$ javac < >
$ java < >
Java 스터디 강의자료 - 1차시
int a;
int b = 1;
int c, d, e = 2;
double f = 3.12312;
char g = 'A';
[ ] [ ];
[ ] [ ] = [ ];
[ ] [1 ], [2 ];
float ave = 5.16F;
long id = 2147483648L;
char ko = ' ';
boolean flag = true;
Java 스터디 강의자료 - 1차시
System.out.println(5 / 2);
int a = 1;
float b = a;
double c = b;
float ave = 3.75F;
int num = (int)ave;
int ii = 3.5; // 7
float f = 3.333; // 9
float ff = 3; // 10
char c = 'A'; // 12
char cc = 65; // 13
boolean b = 1; // 15
test.java:7: error: incompatible types: possible lossy conversion from
double to int
int ii = 3.5;
^
test.java:9: error: incompatible types: possible lossy conversion from
double to float
float f = 3.333;
^
Java 스터디 강의자료 - 1차시
int i, sum = 0;
for (i = 1; i <= 10; i++) {
if (i % 2 == 0)
sum += i;
}
System.out.println("Sum: " + sum);
int i = 2;
double r = Math.sqrt(i);
System.out.print("The square root of ");
System.out.print(i);
System.out.print(" is ");
System.out.print(r);
System.out.println(".");
The square root of 2 is 1.4142135623730951.
int i = 5;
double r = Math.sqrt(i);
System.out.println("The square root of " + i + " is " + r + ".");
The square root of 5 is 2.23606797749979.
int i = 2;
double r = Math.sqrt(i);
System.out.format("The square root of %d is %f.%n", i, r);
The square root of 2 is 1.414214.
import java.util.Scanner;
class Test {
public static void main(String[] args) {
int x;
Scanner input = new Scanner(System.in);
x = input.nextInt();
System.out.println(" : " + x);
}
}
123
: 123
String s = "this is a string";
String s1 = "cat";
String s2 = s1 + " dog";
System.out.println(s2);
// declares an array of integers
int[] anArray;
// allocates memory for 10 integers
anArray = new int[10];
anArray[0] = 100;
anArray[1] = 200;
System.out.println("Element at index 0: " + anArray[0]);
System.out.println("Element at index 1: " + anArray[1]);
System.out.println(anArray.length);
Java 스터디 강의자료 - 1차시
int v = 0;
for (int i = 1; i <= 3; i++) {
int v = 10;
v += i;
System.out.format("i=%2d, v=%dn", i, v);
}
System.out.format("Outer v=%dn", v);
i= 1, v=? i= 2, v=? i= 3, v=?
Outer v=?
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
Ad

More Related Content

What's hot (20)

Avl tree
Avl treeAvl tree
Avl tree
loyola ICAM college of engineering and technology
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
Ankit Dixit
 
01 list using array
01 list using array01 list using array
01 list using array
SivakamiRaja1
 
System programs in C language.
System programs in C language.System programs in C language.
System programs in C language.
Sudhakar Srivastava
 
C Programming Language Part 4
C Programming Language Part 4C Programming Language Part 4
C Programming Language Part 4
Rumman Ansari
 
Codemania101: The Present, Past and Future of Asynchronous Programming in Python
Codemania101: The Present, Past and Future of Asynchronous Programming in PythonCodemania101: The Present, Past and Future of Asynchronous Programming in Python
Codemania101: The Present, Past and Future of Asynchronous Programming in Python
Yothin Muangsommuk
 
New text document
New text documentNew text document
New text document
Debranjan Pal
 
Perl 5.28 new features
Perl 5.28 new featuresPerl 5.28 new features
Perl 5.28 new features
brian d foy
 
#2
#2#2
#2
Kaido Iwamoto
 
C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시
Junha Jang
 
Ejercicios Scilab Completo
Ejercicios Scilab CompletoEjercicios Scilab Completo
Ejercicios Scilab Completo
Ricardo Grandas
 
Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
alexistorres
 
Taller De Scilab
Taller De ScilabTaller De Scilab
Taller De Scilab
Andrés Renteria
 
Data Structures : array operations in c program
Data Structures : array operations in c program Data Structures : array operations in c program
Data Structures : array operations in c program
Raghavendra Narayan
 
Array imp of list
Array imp of listArray imp of list
Array imp of list
Elavarasi K
 
Logic development
Logic developmentLogic development
Logic development
Jerin John
 
Uts
UtsUts
Uts
pencari buku
 
Java interface and inheritance
Java interface and inheritanceJava interface and inheritance
Java interface and inheritance
JaromirJagr
 
WAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaWAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in java
One97 Communications Limited
 
6 things about perl 6
6 things about perl 66 things about perl 6
6 things about perl 6
brian d foy
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
Ankit Dixit
 
C Programming Language Part 4
C Programming Language Part 4C Programming Language Part 4
C Programming Language Part 4
Rumman Ansari
 
Codemania101: The Present, Past and Future of Asynchronous Programming in Python
Codemania101: The Present, Past and Future of Asynchronous Programming in PythonCodemania101: The Present, Past and Future of Asynchronous Programming in Python
Codemania101: The Present, Past and Future of Asynchronous Programming in Python
Yothin Muangsommuk
 
Perl 5.28 new features
Perl 5.28 new featuresPerl 5.28 new features
Perl 5.28 new features
brian d foy
 
C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시C언어 스터디 강의자료 - 1차시
C언어 스터디 강의자료 - 1차시
Junha Jang
 
Ejercicios Scilab Completo
Ejercicios Scilab CompletoEjercicios Scilab Completo
Ejercicios Scilab Completo
Ricardo Grandas
 
Data Structures : array operations in c program
Data Structures : array operations in c program Data Structures : array operations in c program
Data Structures : array operations in c program
Raghavendra Narayan
 
Array imp of list
Array imp of listArray imp of list
Array imp of list
Elavarasi K
 
Logic development
Logic developmentLogic development
Logic development
Jerin John
 
Java interface and inheritance
Java interface and inheritanceJava interface and inheritance
Java interface and inheritance
JaromirJagr
 
WAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaWAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in java
One97 Communications Limited
 
6 things about perl 6
6 things about perl 66 things about perl 6
6 things about perl 6
brian d foy
 

Similar to Java 스터디 강의자료 - 1차시 (20)

Java_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJava_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdf
JayveeCultivo
 
Java Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdfJava Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdf
Aditya Kumar
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
Ganesh Samarthyam
 
Vcs16
Vcs16Vcs16
Vcs16
Malikireddy Bramhananda Reddy
 
Wap to implement bitwise operators
Wap to implement bitwise operatorsWap to implement bitwise operators
Wap to implement bitwise operators
Harleen Sodhi
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)
Chhom Karath
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
mayorothenguyenhob69
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
walia Shaan
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
MaruMengesha
 
Java operators
Java operatorsJava operators
Java operators
Shehrevar Davierwala
 
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
 Problem1 java codeimport java.util.Scanner; Java code to pr.pdf Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
anupamfootwear
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
Pj01 4-operators and control flow
Pj01 4-operators and control flowPj01 4-operators and control flow
Pj01 4-operators and control flow
SasidharaRaoMarrapu
 
UNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptxUNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptx
Abhishekkumarsingh630054
 
Operators
OperatorsOperators
Operators
Daman Toor
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
MaruMengesha
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory
archana singh
 
Cpl
CplCpl
Cpl
Ayesha Shariff
 
Java Fundamentals
Java FundamentalsJava Fundamentals
Java Fundamentals
Shalabh Chaudhary
 
VTU DSA Lab Manual
VTU DSA Lab ManualVTU DSA Lab Manual
VTU DSA Lab Manual
AkhilaaReddy
 
Java_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJava_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdf
JayveeCultivo
 
Java Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdfJava Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdf
Aditya Kumar
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
Ganesh Samarthyam
 
Wap to implement bitwise operators
Wap to implement bitwise operatorsWap to implement bitwise operators
Wap to implement bitwise operators
Harleen Sodhi
 
Chapter i(introduction to java)
Chapter i(introduction to java)Chapter i(introduction to java)
Chapter i(introduction to java)
Chhom Karath
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
mayorothenguyenhob69
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
walia Shaan
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
MaruMengesha
 
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
 Problem1 java codeimport java.util.Scanner; Java code to pr.pdf Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
anupamfootwear
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
Pj01 4-operators and control flow
Pj01 4-operators and control flowPj01 4-operators and control flow
Pj01 4-operators and control flow
SasidharaRaoMarrapu
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_01-Mar-2021_L12...
MaruMengesha
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory
archana singh
 
VTU DSA Lab Manual
VTU DSA Lab ManualVTU DSA Lab Manual
VTU DSA Lab Manual
AkhilaaReddy
 
Ad

More from Junha Jang (8)

Flask 소수전공 강의자료 - 4차시
Flask 소수전공 강의자료 - 4차시Flask 소수전공 강의자료 - 4차시
Flask 소수전공 강의자료 - 4차시
Junha Jang
 
Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시
Junha Jang
 
Flask 소수전공 강의자료 - 1차시
Flask 소수전공 강의자료 - 1차시Flask 소수전공 강의자료 - 1차시
Flask 소수전공 강의자료 - 1차시
Junha Jang
 
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Junha Jang
 
C언어 스터디 강의자료 - 5차시
C언어 스터디 강의자료 - 5차시C언어 스터디 강의자료 - 5차시
C언어 스터디 강의자료 - 5차시
Junha Jang
 
C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시
Junha Jang
 
C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시
Junha Jang
 
C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시
Junha Jang
 
Flask 소수전공 강의자료 - 4차시
Flask 소수전공 강의자료 - 4차시Flask 소수전공 강의자료 - 4차시
Flask 소수전공 강의자료 - 4차시
Junha Jang
 
Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시Flask 소수전공 강의자료 - 3차시
Flask 소수전공 강의자료 - 3차시
Junha Jang
 
Flask 소수전공 강의자료 - 1차시
Flask 소수전공 강의자료 - 1차시Flask 소수전공 강의자료 - 1차시
Flask 소수전공 강의자료 - 1차시
Junha Jang
 
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Junha Jang
 
C언어 스터디 강의자료 - 5차시
C언어 스터디 강의자료 - 5차시C언어 스터디 강의자료 - 5차시
C언어 스터디 강의자료 - 5차시
Junha Jang
 
C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시
Junha Jang
 
C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시
Junha Jang
 
C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시
Junha Jang
 
Ad

Recently uploaded (20)

Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 

Java 스터디 강의자료 - 1차시

  • 8. class Test { public static void main(String[] args) { System.out.println("Hello world!"); } } $ javac test.java $ java Test Hello world!
  • 9. $ javac < > $ java < >
  • 11. int a; int b = 1; int c, d, e = 2; double f = 3.12312; char g = 'A'; [ ] [ ]; [ ] [ ] = [ ]; [ ] [1 ], [2 ];
  • 12. float ave = 5.16F; long id = 2147483648L; char ko = ' '; boolean flag = true;
  • 14. System.out.println(5 / 2); int a = 1; float b = a; double c = b; float ave = 3.75F; int num = (int)ave;
  • 15. int ii = 3.5; // 7 float f = 3.333; // 9 float ff = 3; // 10 char c = 'A'; // 12 char cc = 65; // 13 boolean b = 1; // 15 test.java:7: error: incompatible types: possible lossy conversion from double to int int ii = 3.5; ^ test.java:9: error: incompatible types: possible lossy conversion from double to float float f = 3.333; ^
  • 17. int i, sum = 0; for (i = 1; i <= 10; i++) { if (i % 2 == 0) sum += i; } System.out.println("Sum: " + sum);
  • 18. int i = 2; double r = Math.sqrt(i); System.out.print("The square root of "); System.out.print(i); System.out.print(" is "); System.out.print(r); System.out.println("."); The square root of 2 is 1.4142135623730951.
  • 19. int i = 5; double r = Math.sqrt(i); System.out.println("The square root of " + i + " is " + r + "."); The square root of 5 is 2.23606797749979.
  • 20. int i = 2; double r = Math.sqrt(i); System.out.format("The square root of %d is %f.%n", i, r); The square root of 2 is 1.414214.
  • 21. import java.util.Scanner; class Test { public static void main(String[] args) { int x; Scanner input = new Scanner(System.in); x = input.nextInt(); System.out.println(" : " + x); } } 123 : 123
  • 22. String s = "this is a string"; String s1 = "cat"; String s2 = s1 + " dog"; System.out.println(s2);
  • 23. // declares an array of integers int[] anArray; // allocates memory for 10 integers anArray = new int[10]; anArray[0] = 100; anArray[1] = 200; System.out.println("Element at index 0: " + anArray[0]); System.out.println("Element at index 1: " + anArray[1]); System.out.println(anArray.length);
  • 25. int v = 0; for (int i = 1; i <= 3; i++) { int v = 10; v += i; System.out.format("i=%2d, v=%dn", i, v); } System.out.format("Outer v=%dn", v); i= 1, v=? i= 2, v=? i= 3, v=? Outer v=?