분류 전체보기(92)
-
클래스(객체), 메소드
배열복사 int []xxx =Arrays.copyOf(num2, num2.length); for (int i : xxx){ sysout(i); } int [] xxx2 = Arrays.copyOf(num2,3); for (int i : xxx2) { sysout(">>>"+i); } 클래스 중요★ ★ ★ ★ ★ 지정자 class 정의 [인스턴스 변수정의] [메소드 정의] [생성자 정의] 현실 세계의 학생 개체에서 뽑은 학생클래스 public class Student { 1. 멤버 변수, 인스턴스 변수 1) 선언위치 : 함수 안이 아닌 클래스 블럭 2) 반드시 클래스 new 객체 생성 후 사용 3) 객체 생성시 각 타입으로 자동 초기화 int => 0, 실수 => 0.0, char => 공백, boolea..
2023.12.05 -
배열
1. 배열선언 데이터형 [] 베열명; 또는 데이터형 배열명 []; 2. 배열생성 배열명 =new 데이터형 [크기]; 3. 배열초기화 배열명 [인덱스] = 값; //1, 배열선언 int num []; //2. 배열생성 num = new int [3]; sysout (num); sysout(num[0]); sysout(num[2]); sysout(num.length); num[0]=10; num[1]=20; num[2]=30; System.out.println(num[0]); System.out.println(num[1]); System.out.println(num[2]); System.out.println("============="); for (int i =0; i >"+i); } //역순 출력 int ..
2023.12.04 -
문장
단일 if문 System.out.println("문장"); int num =1000; int num2 = 100; if (num == 1000) { // 조건이 true 인 경우 블럭안의 코드실행 num2 =10; System.out.println("문장2"+num); System.out.println("문장2-1"); }// end if 조건이 false 인 경우 블럭 밖에서부터 실행 System.out.println(num); System.out.println(num2);//num2 사용안함 System.out.println("문장3"); if (result ==0) //한줄의 명령인 경우 { } 생략가능 mesg ="짝수"; → 위 코드와 같음 String mesg ="짝수"; if (result ..
2023.11.30 -
식별자와 데이터형, 연산자
4. 변수 student stu= new student(); //student 이름, 나이 학 byte b =10; //-128 ~127 short b2 =20; int b3 =30; long b4 =40L; //주민번호저장 //int ssn_int = 8901201234567; long ssn =8901201234567L; String ssn_string="890120-1234567"; System.out.println(Integer.MIN_VALUE); System.out.println(Integer.MAX_VALUE); int num=10; //메인블럭에서 선언된 로컬변수는 main전체에서 사용이 가능. {//a블럭 num =20; int num2=10;//a블럭안에서만 사용가능한 로컬변수 //in..
2023.11.29 -
CSS+ JAVA
17. 폰트 속성 .a{ font-size: xx-small; } .b{ font-size: x-small; } .c{ font-size: small; } .d{ font-size: medium; } .e{ font-size: large; } .f{ font-size: x-large; } .g{ font-size: xx-large; } font-style 속성과 font-weight 속성 p{ font-size: 2em; font-style: italic; font-weight: bold; } text-align 속성 글자의 수평 정렬을 지정하는 속성이다. h1{ text-align: center; } h2{ text-align: left; } h3{ text-align: right; } div{ bor..
2023.11.29 -
CSS
HTML 마무리 -file entype 파일선택: -fieldset/legend 로그인 아이디: 비밀번호: 12. img 태그 그밖에 -pre HTML5 HTML5 HTML5 HTML5 HTML5 HTML5 HTML5 HTML5 → 그대로 나옴 CSS css 적용방식 세가지 inline 방식 : 적용하려는 태그내에서 style=“CSS” 형식 사용 hello incline Style internal 방식 : 적용하려는 태그가 포함된 HTML파일에서 사용 hello incline Style internal Style external style external방식 : HTMl 파일과 다른 파일에서 사용, *.css 파일형식 hello incline Style internal Style external sty..
2023.11.28