Backend 153

JAVA 코딩 API (Application Programming Interface) - Math, System, Date, Scanner

api.lang.Math : 수학 계산 클래스 public class Test01 { public static void main (String[] args) { double a = 1.5; System.out.println(Math.floor(a)); // 버림 System.out.println(Math.round(a)); // 반올림 System.out.println(Math.ceil(a)); // 올림 int b = 3; int c = 4; System.out.println(Math.pow(b, 3)); // 제곱근 구하기 System.out.println(Math.pow(c, 2)); // 제곱근 구하기 double d = Math.pow(b, 2) + Math.pow(c, 2); double e ..

Backend/JAVA 2023.03.03

JAVA 코딩 API (Application Programming Interface) - File

API - File java.io.File : 파일과 폴더를 구별하지 않고 함게 관리하는 클래스 import java.io.File; public class Test01 { public static void main (String[] args) { File f = new File("sample.txt"); System.out.println(f.exists()); // 대상 파일이 존재하는가? System.out.println(f.isFile()); // 대상이 파일인가? System.out.println(f.isDirectory()); // 대상이 폴더인가 // 파일 정보 System.out.println(f); System.out.println(f.getName()); // 파일명 System.out...

Backend/JAVA 2023.03.02

JAVA 코딩 API (Application Programming Interface) - String : FileOutputStream, OutputStream, FileWriter, append

API - String import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; public class Test01 { public static void main (String[] args) { // 문자열 저장 File target = new File("files", "string1.txt"); OutputStream out = null; String text = "어둠만이 나의 전부였던 동안\r\n" + "숨이 벅차도록 달려왔잖아\r\n" + "Never say “time's up”\r\n" +..

Backend/JAVA 2023.03.02

JAVA 객체지향 프로그래밍 OOP, Class 상속 - 부모클래스, 자식클래스

JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 https://developernew.tistory.com/21 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 객체 지향 프로그래밍(OOP: Object Oriented Programming) 객체 중심의 프로그래밍 방식 객체끼리의 상호 작용을 통하여 프로그램을 작성하는 방식 부품화 캡슐화 == 클래스 속성과 기능을 하나의 캡슐처 developernew.tistory.com JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static https://developernew.tistory.com/22 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static 자바 클래스 기본개념..

Backend/JAVA 2023.02.27

JAVA 코딩 API (Application Programming Interface) - Collections Framework

Collections Framework : 무한의 데이터를 저장할 수 있는 공간 최소한의 자원으로 최대한의 효율을 낼 수 있도록 만든 프로그램의 기본 틀 ; 반 강제성을 가지고 있는 프로그램의 기본 틀 -> 결국 클래스들의 모음 Framework 최소한의 자원으로 최대한의 효율을 낼 수 있도록 만든 프로그램의 기본 틀 Collection을 상속받은 애들 : 요소 안에 데이터를 저장하는 형태 1. set : 데이터 중복 불가, 데이터 간 순서 없음 전체의 데이터를 가져오거나 넣을 때 주로 이용된다 2. List : 데이터 중복 가능, 데이터간의 순서가 유지된다 확장형 배열 인덱스값을 사용하여 데이터를 중간에 가져오거나 할 수 있다 주로 목록화된 데이터의 검색과 수정이 많이 이루어져야 하는 경우 사용된다 M..

Backend/JAVA 2023.02.23

JAVA 코딩 API (Application Programming Interface) - Integer, Exception

JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 https://developernew.tistory.com/21 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 객체 지향 프로그래밍(OOP: Object Oriented Programming) 객체 중심의 프로그래밍 방식 객체끼리의 상호 작용을 통하여 프로그램을 작성하는 방식 부품화 캡슐화 == 클래스 속성과 기능을 하나의 캡슐처 developernew.tistory.com JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static https://developernew.tistory.com/22 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static 자바 클래스 기본개념..

Backend/JAVA 2023.02.23

JAVA 코딩 Class 클래스 다형성

다형성 : 다양한 형태나 성질 하나의 객체를 여러개의 클래스로 표현하는 것을 말한다 상속이 기본 클래스를 기능별로 분리하여 통합적인 처리를 하기 위해 사용된다 ; 다중상속 업캐스팅을 바탕으로 이루어진다 부모의 참조형변수 안에 자식클래스의 인스턴스 공간의 정보가 저장되는 형태 ex. // Animal class public class Animal { private String name; public Animal (String name) { this.name = name; } public void info () { System.out.println("이름 : " + name); } public void bark () { System.out.println("????????????????????????????"..

Backend/JAVA 2023.02.23

JAVA 코딩 객체지향프로그래밍 OOP, 배열 클래스 Array Class

JAVA 객체지향 프로그래밍 OOP, Class 기본개념 및 예제 https://developernew.tistory.com/21 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 객체 지향 프로그래밍(OOP: Object Oriented Programming) 객체 중심의 프로그래밍 방식 객체끼리의 상호 작용을 통하여 프로그램을 작성하는 방식 부품화 캡슐화 == 클래스 속성과 기능을 하나의 캡슐처 developernew.tistory.com JAVA 객체지향 프로그래밍 OOP, Class, Static https://developernew.tistory.com/22 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static 자바 클래스 기본개념 및 기본예제 htt..

Backend/JAVA 2023.02.22

JAVA 코딩 객체지향프로그래밍 OOP, Class 중첩클래스 - 일반중첩클래스, static중첩클래스, 지역중첩클래스, 익명중첩클래스

JAVA 객체지향 프로그래밍 OOP, Class 기본개념 및 예제 https://developernew.tistory.com/21 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, 함수, 메소드 객체 지향 프로그래밍(OOP: Object Oriented Programming) 객체 중심의 프로그래밍 방식 객체끼리의 상호 작용을 통하여 프로그램을 작성하는 방식 부품화 캡슐화 == 클래스 속성과 기능을 하나의 캡슐처 developernew.tistory.com JAVA 객체지향 프로그래밍 OOP, Class, Static https://developernew.tistory.com/22 JAVA 코딩 객체지향프로그래밍 OOP, 클래스 Class, static 자바 클래스 기본개념 및 기본예제 htt..

Backend/JAVA 2023.02.21