Java 기본
Java의 주요 특징 객체 지향 프로그래밍 (OOP) Java는 거의 모든 것이 객체(Object)로 이루어져 있다. 이는 코드를 재사용하고 유지보수하기 쉽게 만들어주는 프로그래밍 방식임. // Java - 클래스 기반 객체 지향 public class Person { private String name; private int ag...
Java의 주요 특징 객체 지향 프로그래밍 (OOP) Java는 거의 모든 것이 객체(Object)로 이루어져 있다. 이는 코드를 재사용하고 유지보수하기 쉽게 만들어주는 프로그래밍 방식임. // Java - 클래스 기반 객체 지향 public class Person { private String name; private int ag...
public class VarargsRules { // OK - 가변 인자는 마지막에 void method1(String name, int... scores) { } // 컴파일 에러! 가변 인자 뒤에 다른 매개변수 불가 // void method2(int... scores, String name) { } // ...
package a.basic.practice_for; public class practice_5 { public static void main(String[] args) { int num = 24; System.out.printf("%d의 약수: ", num); for(int i = 1; i <...
Main.java: // 카테고리 검색 System.out.println("\n[검색: 전자기기]"); Product[] electronics = manager.searchProductsByCategory("전자기기"); for (int i = 0; i < electronics...
public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ int numOfDay = sc.nextInt(); String day = ""; if(numO...
문제 4: 삼각형 유효성 검사 세 변의 길이를 입력받아 삼각형을 만들 수 있는지 검사하세요. 삼각형 조건: 세 변의 길이가 모두 양수 가장 긴 변 < 나머지 두 변의 합 입력: int a = 3, b = 4, c = 5; 예상 출력: 삼각형을 만들 수 있습니다. 두번째 조건식에 && 연산자가 아닌 || ...
Gemini - MySQL MCP https://geminicli.com/extensions/ https://github.com/gemini-cli-extensions/mysql gemini extensions install https://github.com/gemini-cli-extensions/mysql 명령어로 bash에서 설치 ...
Error Code: 1242. Subquery returns more than 1 row 에러 나는 쿼리 select title from film where film_id = (select film_id from film_category where category_id = (select category_id from category where n...
뷰(View): 하나 이상의 테이블로부터 유도된 가상 테이블(Virtual Table) 가상: 실제 데이터를 저장하지 않음 (쿼리 정의만 저장) 동적결과: 뷰를 조회할 때마다 기본 테이블에서 데이터를 가져옴 재사용성: 복잡한 쿼리를 뷰로 만들어 반복 사용 보안: 특정 컬럼/행만 노출하여 데이터 접근 제어 독립성: 기본 테이블 구조...