example)
public class PrintlnMethod {
public static void main( String[] args ) {
// println()using print different values
System.out.println( 3 );
System.out.println( 3.14 );
System.out.println( 'c' );
System.out.println( "gemini" );
// System : class / out : staticmember
}
}
data type
1) primitive type : value pass call by value
int a=5;
float f=4.5;
…..
methodA(a,f); // methodA actual parameter call : call by value
methodA(int b, float g) { // methodA formal parameter call : call by value
……..
}
2) composite type : address " call by reference :object startaddress value pass
class A {
int a;
int b;
}
……
A obA = new A(); ………
methodA(obA) // methodA call
inheritance
JDKfrom top-level class = object class (rt.jar>java.lang>object class)
(object class->) A class-> B class
inheritance O : memberfunction,datamember
inheritance X : creation,private
object class : address type = object definition
A class : address type = object , A class definition
B class : address type = object , A class, B class definition
object auto type conversion (addresstype therefore addressvalues substitute can.)
subclasstype contained in object address
parentclasstype's reference variable address value substitute can.
o : A class -> object class
o : B class -> A class
address value substitute (forced type conversion) => cast operator utilize
x : object class -> A class
x : A class -> B class
polymorphism implementation
overloading(overloading) : duplicatefunction
same class within same name constructor or method(memberfunction) using behavior
parametervariable count and type must differ !
parametervariable count and type occurrence form executioncondition auto passed.
however,parametervariable typeonly case X !
over(overriding) : re-definition
inheritancerelationship class
function header must occurrencemust .
parametervariable count and type same .
O = private -> default (omitted's case) -> protected -> public
x = public -> protected -> default (omitted's case) -> private
example)
Object : public void String toString(){ //function re-definition
AA : public void String toString(){}
BB : public void String toString(){}
CC : public void String toString(){}
}
//public change.
- Open in Google Docs Viewer
- Open link in new tab
- Open link in new window
- Open link in new incognito window
- Download file
- Copy link address
- Edit PDF File on PDFescape.com
element
| Font | |
|---|---|
| font-family | |
| font-size | |
| font-style | |
| font-variant | |
| font-weight | |
| letter-spacing | |
| line-height | |
| text-decoration | |
| text-align | |
| text-indent | |
| text-transform | |
| white-space | |
| word-spacing | |
| color | |
| Background | |
| bg-attachment | |
| bg-color | |
| bg-image | |
| bg-position | |
| bg-repeat | |
| Box | |
| width | |
| height | |
| border-top | |
| border-right | |
| border-bottom | |
| border-left | |
| margin | |
| padding | |
| max-height | |
| min-height | |
| max-width | |
| min-width | |
| outline-color | |
| outline-style | |
| outline-width | |
| Positioning | |
| position | |
| top | |
| bottom | |
| right | |
| left | |
| float | |
| display | |
| clear | |
| z-index | |
| List | |
| list-style-image | |
| list-style-type | |
| list-style-position | |
| Table | |
| vertical-align | |
| border-collapse | |
| border-spacing | |
| caption-side | |
| empty-cells | |
| table-layout | |
| Effects | |
| text-shadow | |
| -webkit-box-shadow | |
| border-radius | |
| Other | |
| overflow | |
| cursor | |
| visibility |
