This document provides an overview of the Advanced Java Programming course offered by Myanma Computer Co., Ltd. The course covers topics such as object-oriented programming in Java, classes and packages, exception handling, I/O, multithreading, GUI, networking, and server-side programming. It also demonstrates Java features and applications, and includes examples of using primitive types, operators, control flow, arrays, methods, strings, and math classes in Java programs.
2. Copyright : MCC ( Advanced Java
Programming) 2
Subject Content
1. Introduction to Java & OOP
2. Programming in Java
3. Types- Primitive, Reference and Garbage Collection
4. Classes and Packages with OO Programming
5. Exception Handling with Java
6. Object Cloning and RTTI
7. Programming I/O within Java
3. Copyright : MCC ( Advanced Java
Programming) 3
Subject Content (cont)
8. Object & Classes in Java
9. Multithreading
10. Introduction to GUI
11. Programming Windows and Events
12. Client side Java, Applets and JavaBeans
13. Network Programming with Java
14. Programming Server-side Java
4. Copyright : MCC ( Advanced Java
Programming) 4
• Inline sound that play in real time whenever
a user loads a page
• Music that plays in the background on a page
• Cartoon Style Animations
• Real time Video
• Multiplayer interactive games
Application of Java
5. Copyright : MCC ( Advanced Java
Programming) 5
Introduction to Java
- Object Oriented Programming
- Developed by Sun Microsystems
- At USA in 1991 by James Gosling.
Originally called Oak
- Platform Independent Language.
Internet Programming Language.
17. Copyright : MCC ( Advanced Java
Programming) 17
Arithmetic Operators (Contd…)
+= Addition and assignment
-= Subtraction and assignment
*= Multiplication and assignment
/= Division and assignment
%= Modulus and assignment
18. Copyright : MCC ( Advanced Java
Programming) 18
Relational Operators
== Equal to
!= Not equal to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to
19. Copyright : MCC ( Advanced Java
Programming) 19
Logical Operators
&& Logical AND
|| Logical OR
! Logical unary NOT
20. Copyright : MCC ( Advanced Java
Programming) 20
Conditional Operator
Syntax
expression1 ? expression2 : expression3;
expression1
Boolean condition that returns a True or False value
Expression2
Value returned if expression1 evaluates to True
expression3
Value returned if exp1 evaluates to False
21. Copyright : MCC ( Advanced Java
Programming) 21
Control Flow
Decision-making
– if-else statement
– switch-case statement
Loop
– while loop
– do-while loop
– for loop
23. Copyright : MCC ( Advanced Java
Programming) 23
Methods in Classes
A method is defined as the actual implementation of
an operation on an object
Syntax
access_specifier modifier datatype method_name(parameter_list)
{
//body of method
}
24. Copyright : MCC ( Advanced Java
Programming) 24
Sample usage of Method
class Temp {
static int x = 10; // variable
public static void show( ) { // method
System.out.println(x);
}
public static void main(String args[ ]) {
Temp t = new Temp( ); // object 1
t.show( ); // method call
Temp t1 = new Temp( ); // object 2
t1.x = 20;
t1.show();
}}
25. Copyright : MCC ( Advanced Java
Programming) 25
String Class
Constructor methods
– String str1 = new String();
– String str2 = new String(“Hello World”);
– char ch[ ] = {“A”,”B”,”C”,”D”,”E”};
– String str3 = new String(ch);
– String str4 = new String(ch,0,2);