비트캠프/실습 9

231227 LinkedList 실습 내용

자료구조 - LinkedList 배열 내가 넣고싶은곳에 넣기 0번째 맨앞에 넣을때 LinkedList 실습 자료 이해하고 여러번 읽어보기 package mystudy.util; public class LinkedList { private Node first; private Node last; private int size; public int size() { return size; } public void add(E value) { Node node = new Node(); // 제네릭 타입 E를 가지는 Node 객체 생성 node.value = value; // 메서드로 전달된 value을 새로운 노드 value 필드에 할당하는 역할 // 새로운 노드에 원하는 값을 저장할수 잇다. if (last ==..

비트캠프/실습 2023.12.27

231206 배열로 콘솔 CRUD 만드는 법 정리

BoardVO 여러개를 넣어줘야 하니깐 배열로 만들어준다! BoardMenu.java package mystudy.myapp; public class BoardMenu { //static Board board = new Board(); 를 사용하면 여러개를 담을수없다!! static Board[] boards = new Board[2]; static int length = 0; // static int length; 라고해도 초기화 된다!! static void printMenu() { System.out.println("[게시글]"); System.out.println("1. 등록"); System.out.println("2. 조회"); System.out.println("3. 변경"); System...

비트캠프/실습 2023.12.06

231201 JAVA switch case 기능단위로 묶기

public static void main(String[] args) { printMenu(); java.util.Scanner keyIn = new java.util.Scanner(System.in); loop: while (true) { String input = prompt("메인", keyIn); switch (input) { case "1": System.out.println("[과제]"); System.out.println("1. 등록"); System.out.println("2. 조회"); System.out.println("3. 변경"); System.out.println("4. 삭제"); System.out.println("0. 이전"); loop2: while (true) { input..

비트캠프/실습 2023.12.01

231129 myapp-app-06 실습 ( 로컬변수, 클래스변수, 반복문)

package mystudy.myapp; import java.util.Scanner; public class App { static final String ANSI_CLEAR = "\033[0m"; // 초기화 static final String ANSI_BOLD_RED = "\033[1;31m"; // 볼드체 + 빨간색글씨 static final String ANSI_RED = "\033[0;31m"; // 빨간색글씨 static final String APP_TITLE = ANSI_BOLD_RED + "[과제관리 시스템]" + ANSI_CLEAR; static final String[] MENUS = { "1. 과제", "2. 게시글", "3. 도움말", ANSI_RED + "4. 종료" + ANS..

비트캠프/실습 2023.11.29

231122 Gradle 자바프로젝트 생성 eclipse / intelliJ

gitbash 열기 mkdir test-app => test-app이란 폴더생성 test-app안에 들어가서 $gradle init 설정 쭉해주고 2 => 3 => 엔터 => 2 => 엔터 => 프로젝트패키지이름설정 => 소스패키지이름설정 => 엔터 => 엔터 하면 파일생성완료 vscode에 들어가서 test-app => app => build.gradle 에서 세팅 변경 플러그인에서 plugins { // Apply the application plugin to add support for building a CLI application in Java. //id 'application' id 'java' id 'eclipse' } //id 'application' 를 설정했으면 // applicatio..

비트캠프/실습 2023.11.22