Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 크롬 인너넷연결 안됨
- 안드로이드폰 위치
- 크롬 타임아웃
- 타카마루
- 응용 프로그램 내 구입
- 크롬 인터넷연결
- 10원단위 올림
- Windows10
- 로니세라
- 분기날짜
- takanaru
- windows10 cisco vpn
- 윈도우10 vpn
- 신주쿠맛집
- 노리로또
- 코로나백신 부작용
- 코로나백신
- 화이자백신
- 코로나백신이상증상
- 신주쿠 로컬식당
- cisco vpn
- windows10 크롬
- 강화 프로방스
- 코로나백신 어지러움
- 10 올림
- 핸드폰 찾기
- 오라클
- 코로나백신 갈증
- 랍스터 찜
- 성수족발
Archives
- Today
- Total
이거 맘대로 되는 세상이 아니구만...
자바 기초 로직을 알아보자...2월1일 수업(3) 본문
반응형
class Test{
public static void main(String args[]){
A a=new A(100);
System.out.println(a.i);
B b1=new B("abc");
B b2=new B("def");
System.out.println(b1.str+","+b2.str);
a.me();
String st=a.me2();
System.out.println(st);
}
}
class A{
int i;
A(int i){
this.i=i;
}
void me(){
System.out.println("메서드1");
}
String me2(){
return "메서드2";
}
}
class B{
String str;
B(String str){
this.str=str;
}
}
*/
/*
class Test{
public static void main(String args[]){
A a=new A(10 , 5);
int re1=a.me1();
int re2=a.me2();
int re3=a.me3();
int re4=a.me4();
System.out.println(re1);
System.out.println(re2);
System.out.println(re3);
System.out.println(re4);
}
}
class A{
int i;
int j;
A(int i, int j){
this.i=i;
this.j=j;
}
int me1(){
return i+j;
}
int me2(){
return i-j;
}
int me3(){
return i*j;
}
int me4(){
return i/j;
}
}
*/
/*
class Test{
public static void main(String args[]){
A a1=new A(3.4 , 'b');
A a2=new A("abc");
A a3=new A(4.5 , 'c');
A a4=new A();
System.out.println(a1.d+","+a1.ch+","+a1.str);
System.out.println(a2.d+","+a2.ch+","+a2.str);
System.out.println(a3.d+","+a3.ch+","+a3.str);
System.out.println(a4.d+","+a4.ch+","+a4.str);
}
}
class A{
double d;
char ch;
String str;
A(double d, char ch){
this.d=d;
this.ch=ch;
}
A(String str){
this.str=str;
}
A(){
}
}
*/
/* 생각을 해봅시다....참조형 변수??
class Test{
public static void main(String args[]){
A a=new A(new B());
}
}
class A{
A(B obj){
}
}
class B{
}
*/
//기본형 참조형 변수.......
//기본형== char, double,.......
//참조형== a b c 등등.....
Soket s=new Soket("localhost",555);
InputStream is=s.getInputStream();
BufferedReader br=new BufferedReader(new InputStreamReader(is))
class Soket{
String s;
int i;
Soket(String s, int i){
}
InputStream getInputStream(){
}
}
class BufferedReader{
BufferedReader(InputStreamReader obj){
}
}
class InputStreamReader{
InputStreamReader(InputStream obj1){
}
}
class InputStream{
}
public static void main(String args[]){
A a=new A(100);
System.out.println(a.i);
B b1=new B("abc");
B b2=new B("def");
System.out.println(b1.str+","+b2.str);
a.me();
String st=a.me2();
System.out.println(st);
}
}
class A{
int i;
A(int i){
this.i=i;
}
void me(){
System.out.println("메서드1");
}
String me2(){
return "메서드2";
}
}
class B{
String str;
B(String str){
this.str=str;
}
}
*/
/*
class Test{
public static void main(String args[]){
A a=new A(10 , 5);
int re1=a.me1();
int re2=a.me2();
int re3=a.me3();
int re4=a.me4();
System.out.println(re1);
System.out.println(re2);
System.out.println(re3);
System.out.println(re4);
}
}
class A{
int i;
int j;
A(int i, int j){
this.i=i;
this.j=j;
}
int me1(){
return i+j;
}
int me2(){
return i-j;
}
int me3(){
return i*j;
}
int me4(){
return i/j;
}
}
*/
/*
class Test{
public static void main(String args[]){
A a1=new A(3.4 , 'b');
A a2=new A("abc");
A a3=new A(4.5 , 'c');
A a4=new A();
System.out.println(a1.d+","+a1.ch+","+a1.str);
System.out.println(a2.d+","+a2.ch+","+a2.str);
System.out.println(a3.d+","+a3.ch+","+a3.str);
System.out.println(a4.d+","+a4.ch+","+a4.str);
}
}
class A{
double d;
char ch;
String str;
A(double d, char ch){
this.d=d;
this.ch=ch;
}
A(String str){
this.str=str;
}
A(){
}
}
*/
/* 생각을 해봅시다....참조형 변수??
class Test{
public static void main(String args[]){
A a=new A(new B());
}
}
class A{
A(B obj){
}
}
class B{
}
*/
//기본형 참조형 변수.......
//기본형== char, double,.......
//참조형== a b c 등등.....
Soket s=new Soket("localhost",555);
InputStream is=s.getInputStream();
BufferedReader br=new BufferedReader(new InputStreamReader(is))
class Soket{
String s;
int i;
Soket(String s, int i){
}
InputStream getInputStream(){
}
}
class BufferedReader{
BufferedReader(InputStreamReader obj){
}
}
class InputStreamReader{
InputStreamReader(InputStream obj1){
}
}
class InputStream{
}
Comments