SlideShare a Scribd company logo
1 of 19
Basic Java Application Developer 
Rudi Hartono 
Comlabs USDI ITB 
Sesi 2 
Erwin Ginanjar 
Comlabs USDI ITB 
Sesi 2 - Java Application Developer
Objektif 
1. Mengerti dan familiar dengan bahasa 
pemrograman Java 
2. Memahami konsep pemrograman 
berorientasi objek 
3. Mampu menggunakan Integrated 
Development Environment Netbeans 
4. Mampu membangun program aplikasi 
desktop berbasis GUI Java 
Sesi 2 - Java Application Developer
Timeline Pelatihan 
Sesi 
1 2 3 4 5 6 7 8 9 10 
Sesi 2 - Java Application Developer
Timeline Pelatihan 
Sesi 
1 2 3 4 5 6 7 8 9 10 
Sesi 2 - Java Application Developer
Sesi 2 
Lesson 3 : Tipe Data Sederhana 
• Tipe Data 
• Operasi Tipe Data 
• Fungsi dan Prosedur Operasi 
Sesi 2 - Java Application Developer
Tipe Data 
Jenis Tipe Data 
Tipe Data Primitif 
Tipe Data Objek 
Sesi 2 - Java Application Developer
Tipe Data Primitif 
Integer – Bilangan Bulat 
Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai 
Byte Byte-length 
Sesi 2 - Java Application Developer 
integer 
8-bit two’s 
complement 
-128,..., 127 120 
short Short integer 16 bit two’s 
complement 
-32768,....,32767 5421 
int Integer 32 bit two’s 
complement 
-2147483648,...., 
2147483647 
536855 
long long integer 64 bit two’s 
complement 
92233720368547 
75808,..., 
92233720368547 
75807 
1526444L
Tipe Data Primitif 
Real numbers – Bilangan pecahan 
Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai 
float Single-precision 
Sesi 2 - Java Application Developer 
floating point 
32 bit IEEE 754 1.7E-308,..., 1.7E- 
308 
12.36F 
double Double-precision 
floating point 
32 bit IEEE 754 3.4E-308,....., 
3.4E-308 
22.370 
22.370D 
25.31e5
Tipe Data Primitif 
Tipe lain 
Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai 
char Karakter tunggal 16-bit Unicode 
character 
Seluruh karakter 
unicode 
Sesi 2 - Java Application Developer 
‘a’, ‘3’, ’*’ 
boolean Nilai boolean 
(true atau false) 
True or false True or false true 
false
Operasi Tipe Data 
Operator Penggunaan Deskripsi 
+ Op1+op2 Op1 ditambah op2 
- Op1-op2 Op1 dikurang op2 
* Op1*op2 Op1 kali op2 
/ Op1/op2 Op1 dibagi op2 
% Op1%op2 Sisa dari op1 dibagi op2 
++ Op++ Increment nilai op sebesar 1, evaluasi 
sebelum increment 
++ ++op Increment nilai op sebesar 1, evaluasi 
setelah increment 
-- Op-- Decrement nilai op sebesar 1 
Sesi 2 - Java Application Developer
Program Operator Increment 
public class OperatorInc{ 
public static void main(String args[]){ 
int a=5; 
System.out.println(a); 
System.out.println(a++); 
System.out.println(++a); 
int b=5; 
System.out.println(b); 
System.out.println(++b); 
System.out.println(b); 
} 
} 
Sesi 2 - Java Application Developer
Operator Logika 
Operator 
> 
>= 
< 
<= 
== 
!= 
&& 
|| 
! 
& 
| 
^ 
Sesi 2 - Java Application Developer
Program Operator Logika 
public class OperatorLogika{ 
public static void main(String args[]){ 
boolean hujan= true; 
if(hujan){ 
System.out.println(“Ibu ke pasar.”); 
} 
if(!hujan){ 
System.out.println(“Ibu tetap pergi ke 
pasar.”); 
} 
} 
} 
Sesi 2 - Java Application Developer
Program Array 
public class ProgramArray { 
public static void main(String args[]){ 
int[] c = new int[5]; 
c[0] = 1; 
c[1] = 2; 
c[2] = 3; 
c[3] = 4; 
c[4] = 5; 
for(int i=0;i<5;i++){ 
System.out.println(“Aray c ke-”+i+” adalah ”+c[i]); 
} 
} 
} 
Sesi 2 - Java Application Developer
Program Expressions, Statements, dan 
Blocks 
public class OperatorExp { 
public static void main(String args[]){ 
double c = 2.0; 
System.out.println(“C = ” + c); 
int a = 0; 
int b = 2; 
int d = 4; 
int hasil = 0; 
hasil = a+b*d; 
System.out.println(“Hasil = ” + hasil); 
hasil = (a+b)*d; 
System.out.println(“Hasil = ” + hasil); 
} 
} 
Sesi 2 - Java Application Developer
Program Expressions, Statements, dan 
Blocks 
public class OperatorExp { 
public static void main(String args[]){ 
double c = 2.0; 
System.out.println(“C = ” + c); 
int a = 0; 
int b = 2; 
int d = 4; 
int hasil = 0; 
hasil = a+b*d; 
System.out.println(“Hasil = ” + hasil); 
hasil = (a+b)*d; 
System.out.println(“Hasil = ” + hasil); 
} 
} 
Sesi 2 - Java Application Developer
Fungsi & Prosedur 
Fungsi = meminta hasil / memberikan balikan 
Prosedur = method yang tidak mengembalikan hasil. 
tipe_data nama_fungsi(param1,param2,....param_n){ 
//statement yang akan dieksekusi 
return nilai_balik; 
} 
void nama_prosedur(param1,param2,....param_n){ 
//statement yang akan dieksekusi 
} 
Sesi 2 - Java Application Developer
Program Fungsi 
public class Fungsi { 
static int hasil; 
static int tambah(int a, int b){ 
int c; 
c = a + b; 
return c; 
} 
public static void main(String args[]){ 
int a=5; 
int b=6; 
hasil = tambah(a,b); 
System.out.println(“Hasil Penjumlahan ” + a + “ dan ” + b + “ adalah 
” + hasil); 
} 
} 
Sesi 2 - Java Application Developer
Program Prosedur 
public class Fungsi { 
static int hasil; 
static void tambah(int a, int b){ 
hasil = a + b; 
} 
public static void main(String args[]){ 
int a=5; 
int b=6; 
tambah(a,b); 
System.out.println(“Hasil Penjumlahan ” + a + “ dan ” + 
b + “ adalah ” + hasil); 
} 
} 
Sesi 2 - Java Application Developer

More Related Content

What's hot

Java programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarJava programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarROHIT JAISWAR
 
Mca 2nd sem u-2 classes & objects
Mca 2nd  sem u-2 classes & objectsMca 2nd  sem u-2 classes & objects
Mca 2nd sem u-2 classes & objectsRai University
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP Zaenal Arifin
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++jehan1987
 
Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - InheritanceDudy Ali
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentnidhileena
 
Lecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMLecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMmanish kumar
 
Generics and collections in Java
Generics and collections in JavaGenerics and collections in Java
Generics and collections in JavaGurpreet singh
 
Interfaces in JAVA !! why??
Interfaces in JAVA !!  why??Interfaces in JAVA !!  why??
Interfaces in JAVA !! why??vedprakashrai
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++Hoang Nguyen
 

What's hot (20)

Java ppt
Java pptJava ppt
Java ppt
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
 
Java programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarJava programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswar
 
Mca 2nd sem u-2 classes & objects
Mca 2nd  sem u-2 classes & objectsMca 2nd  sem u-2 classes & objects
Mca 2nd sem u-2 classes & objects
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++
 
CORE JAVA-2
CORE JAVA-2CORE JAVA-2
CORE JAVA-2
 
Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - Inheritance
 
Class method
Class methodClass method
Class method
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
C++ oop
C++ oopC++ oop
C++ oop
 
Lecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMLecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVM
 
Generics and collections in Java
Generics and collections in JavaGenerics and collections in Java
Generics and collections in Java
 
Interfaces in JAVA !! why??
Interfaces in JAVA !!  why??Interfaces in JAVA !!  why??
Interfaces in JAVA !! why??
 
Lecture 4. mte 407
Lecture 4. mte 407Lecture 4. mte 407
Lecture 4. mte 407
 
Java Programming - 03 java control flow
Java Programming - 03 java control flowJava Programming - 03 java control flow
Java Programming - 03 java control flow
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 

Viewers also liked

Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...
Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...
Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...Neeraj Singh
 
Top 8 data entry clerk resume samples
Top 8 data entry clerk resume samplesTop 8 data entry clerk resume samples
Top 8 data entry clerk resume samplesMarkBosnich888
 
Data entry clerk cover letter
Data entry clerk cover letterData entry clerk cover letter
Data entry clerk cover letteralicebrown518
 
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)Heena Chourasia
 
Sreekanth java developer raj
Sreekanth java developer rajSreekanth java developer raj
Sreekanth java developer rajsreekanthavco
 
Sunil Kumar Thumma Resume
Sunil Kumar Thumma ResumeSunil Kumar Thumma Resume
Sunil Kumar Thumma Resumesunil thumma
 
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWT
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWTResume - Taranjeet Singh - 3.5 years - Java/J2EE/GWT
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWTtaranjs
 
Java developer resume(1)
Java developer resume(1)Java developer resume(1)
Java developer resume(1)Shubham Goswami
 
Resume For Java Devloper
Resume For Java DevloperResume For Java Devloper
Resume For Java Devloperveerendra_veeru
 
Net experience-resume-sample
Net experience-resume-sampleNet experience-resume-sample
Net experience-resume-sampleAmit Sawant
 

Viewers also liked (11)

Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...
Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...
Neeraj Singh(Java Developer)(Imagination Learning System)(2 Years 3 Months)(2...
 
Top 8 data entry clerk resume samples
Top 8 data entry clerk resume samplesTop 8 data entry clerk resume samples
Top 8 data entry clerk resume samples
 
Data entry clerk cover letter
Data entry clerk cover letterData entry clerk cover letter
Data entry clerk cover letter
 
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)
Curricular Vitae Heena Test Er. QA_Manual_Automation_Java 2 Years exp (2)
 
Sreekanth java developer raj
Sreekanth java developer rajSreekanth java developer raj
Sreekanth java developer raj
 
Sunil Kumar Thumma Resume
Sunil Kumar Thumma ResumeSunil Kumar Thumma Resume
Sunil Kumar Thumma Resume
 
Java Developer resume
Java Developer resume Java Developer resume
Java Developer resume
 
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWT
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWTResume - Taranjeet Singh - 3.5 years - Java/J2EE/GWT
Resume - Taranjeet Singh - 3.5 years - Java/J2EE/GWT
 
Java developer resume(1)
Java developer resume(1)Java developer resume(1)
Java developer resume(1)
 
Resume For Java Devloper
Resume For Java DevloperResume For Java Devloper
Resume For Java Devloper
 
Net experience-resume-sample
Net experience-resume-sampleNet experience-resume-sample
Net experience-resume-sample
 

Similar to Basic Java Application Developer Sesi 2

4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdfamitbhachne
 
Java programming concept
Java programming conceptJava programming concept
Java programming conceptSanjay Gunjal
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924yohanbeschi
 
The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30Mahmoud Samir Fayed
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented TechnologiesUmesh Nikam
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software DevelopmentZeeshan MIrza
 
I/O (imput/output) [JAVA]
I/O  (imput/output) [JAVA]I/O  (imput/output) [JAVA]
I/O (imput/output) [JAVA]Hack '
 
Quality of life through Unit Testing
Quality of life through Unit TestingQuality of life through Unit Testing
Quality of life through Unit TestingSian Lerk Lau
 
Topic2JavaBasics.ppt
Topic2JavaBasics.pptTopic2JavaBasics.ppt
Topic2JavaBasics.pptMENACE4
 
hallleuah_java.ppt
hallleuah_java.ppthallleuah_java.ppt
hallleuah_java.pptRahul201258
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSnikshaikh786
 
Using Dagger in a Clean Architecture project
Using Dagger in a Clean Architecture projectUsing Dagger in a Clean Architecture project
Using Dagger in a Clean Architecture projectFabio Collini
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questionsSANTOSH RATH
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seamsLlewellyn Falco
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesGanesh Samarthyam
 

Similar to Basic Java Application Developer Sesi 2 (20)

4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf
 
C# 6.0 Preview
C# 6.0 PreviewC# 6.0 Preview
C# 6.0 Preview
 
Java programming concept
Java programming conceptJava programming concept
Java programming concept
 
Struts2 notes
Struts2 notesStruts2 notes
Struts2 notes
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924
 
The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30The Ring programming language version 1.4 book - Part 3 of 30
The Ring programming language version 1.4 book - Part 3 of 30
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
 
I/O (imput/output) [JAVA]
I/O  (imput/output) [JAVA]I/O  (imput/output) [JAVA]
I/O (imput/output) [JAVA]
 
Quality of life through Unit Testing
Quality of life through Unit TestingQuality of life through Unit Testing
Quality of life through Unit Testing
 
Topic2JavaBasics.ppt
Topic2JavaBasics.pptTopic2JavaBasics.ppt
Topic2JavaBasics.ppt
 
hallleuah_java.ppt
hallleuah_java.ppthallleuah_java.ppt
hallleuah_java.ppt
 
2.ppt
2.ppt2.ppt
2.ppt
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUS
 
Using Dagger in a Clean Architecture project
Using Dagger in a Clean Architecture projectUsing Dagger in a Clean Architecture project
Using Dagger in a Clean Architecture project
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questions
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
1_JavIntro
1_JavIntro1_JavIntro
1_JavIntro
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Basic Java Application Developer Sesi 2

  • 1. Basic Java Application Developer Rudi Hartono Comlabs USDI ITB Sesi 2 Erwin Ginanjar Comlabs USDI ITB Sesi 2 - Java Application Developer
  • 2. Objektif 1. Mengerti dan familiar dengan bahasa pemrograman Java 2. Memahami konsep pemrograman berorientasi objek 3. Mampu menggunakan Integrated Development Environment Netbeans 4. Mampu membangun program aplikasi desktop berbasis GUI Java Sesi 2 - Java Application Developer
  • 3. Timeline Pelatihan Sesi 1 2 3 4 5 6 7 8 9 10 Sesi 2 - Java Application Developer
  • 4. Timeline Pelatihan Sesi 1 2 3 4 5 6 7 8 9 10 Sesi 2 - Java Application Developer
  • 5. Sesi 2 Lesson 3 : Tipe Data Sederhana • Tipe Data • Operasi Tipe Data • Fungsi dan Prosedur Operasi Sesi 2 - Java Application Developer
  • 6. Tipe Data Jenis Tipe Data Tipe Data Primitif Tipe Data Objek Sesi 2 - Java Application Developer
  • 7. Tipe Data Primitif Integer – Bilangan Bulat Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai Byte Byte-length Sesi 2 - Java Application Developer integer 8-bit two’s complement -128,..., 127 120 short Short integer 16 bit two’s complement -32768,....,32767 5421 int Integer 32 bit two’s complement -2147483648,...., 2147483647 536855 long long integer 64 bit two’s complement 92233720368547 75808,..., 92233720368547 75807 1526444L
  • 8. Tipe Data Primitif Real numbers – Bilangan pecahan Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai float Single-precision Sesi 2 - Java Application Developer floating point 32 bit IEEE 754 1.7E-308,..., 1.7E- 308 12.36F double Double-precision floating point 32 bit IEEE 754 3.4E-308,....., 3.4E-308 22.370 22.370D 25.31e5
  • 9. Tipe Data Primitif Tipe lain Nama Deskripsi Ukuran/Format Rentang nilai Contoh nilai char Karakter tunggal 16-bit Unicode character Seluruh karakter unicode Sesi 2 - Java Application Developer ‘a’, ‘3’, ’*’ boolean Nilai boolean (true atau false) True or false True or false true false
  • 10. Operasi Tipe Data Operator Penggunaan Deskripsi + Op1+op2 Op1 ditambah op2 - Op1-op2 Op1 dikurang op2 * Op1*op2 Op1 kali op2 / Op1/op2 Op1 dibagi op2 % Op1%op2 Sisa dari op1 dibagi op2 ++ Op++ Increment nilai op sebesar 1, evaluasi sebelum increment ++ ++op Increment nilai op sebesar 1, evaluasi setelah increment -- Op-- Decrement nilai op sebesar 1 Sesi 2 - Java Application Developer
  • 11. Program Operator Increment public class OperatorInc{ public static void main(String args[]){ int a=5; System.out.println(a); System.out.println(a++); System.out.println(++a); int b=5; System.out.println(b); System.out.println(++b); System.out.println(b); } } Sesi 2 - Java Application Developer
  • 12. Operator Logika Operator > >= < <= == != && || ! & | ^ Sesi 2 - Java Application Developer
  • 13. Program Operator Logika public class OperatorLogika{ public static void main(String args[]){ boolean hujan= true; if(hujan){ System.out.println(“Ibu ke pasar.”); } if(!hujan){ System.out.println(“Ibu tetap pergi ke pasar.”); } } } Sesi 2 - Java Application Developer
  • 14. Program Array public class ProgramArray { public static void main(String args[]){ int[] c = new int[5]; c[0] = 1; c[1] = 2; c[2] = 3; c[3] = 4; c[4] = 5; for(int i=0;i<5;i++){ System.out.println(“Aray c ke-”+i+” adalah ”+c[i]); } } } Sesi 2 - Java Application Developer
  • 15. Program Expressions, Statements, dan Blocks public class OperatorExp { public static void main(String args[]){ double c = 2.0; System.out.println(“C = ” + c); int a = 0; int b = 2; int d = 4; int hasil = 0; hasil = a+b*d; System.out.println(“Hasil = ” + hasil); hasil = (a+b)*d; System.out.println(“Hasil = ” + hasil); } } Sesi 2 - Java Application Developer
  • 16. Program Expressions, Statements, dan Blocks public class OperatorExp { public static void main(String args[]){ double c = 2.0; System.out.println(“C = ” + c); int a = 0; int b = 2; int d = 4; int hasil = 0; hasil = a+b*d; System.out.println(“Hasil = ” + hasil); hasil = (a+b)*d; System.out.println(“Hasil = ” + hasil); } } Sesi 2 - Java Application Developer
  • 17. Fungsi & Prosedur Fungsi = meminta hasil / memberikan balikan Prosedur = method yang tidak mengembalikan hasil. tipe_data nama_fungsi(param1,param2,....param_n){ //statement yang akan dieksekusi return nilai_balik; } void nama_prosedur(param1,param2,....param_n){ //statement yang akan dieksekusi } Sesi 2 - Java Application Developer
  • 18. Program Fungsi public class Fungsi { static int hasil; static int tambah(int a, int b){ int c; c = a + b; return c; } public static void main(String args[]){ int a=5; int b=6; hasil = tambah(a,b); System.out.println(“Hasil Penjumlahan ” + a + “ dan ” + b + “ adalah ” + hasil); } } Sesi 2 - Java Application Developer
  • 19. Program Prosedur public class Fungsi { static int hasil; static void tambah(int a, int b){ hasil = a + b; } public static void main(String args[]){ int a=5; int b=6; tambah(a,b); System.out.println(“Hasil Penjumlahan ” + a + “ dan ” + b + “ adalah ” + hasil); } } Sesi 2 - Java Application Developer