
What Is a Web Server? A web server is a computer that hosts web pages, making them accessible online. When a user loads a site, the web server will retrieve the relevant files and send them to the browser so the user can interact with them. In this structure, one program 〰️ the client 〰️ requests a resource or service from another program 〰️ the server. Web servers user HTTP(Hypertext Transfer P..

숫자 만들기 게임 GUI를 구현하는 걸 배우고, 더 공부가 필요할 것 같아 정리해 봤다. 영어가 더 편해서 영어로 정리를 하겠다. Java Swing class Hierarchy Diagram Swing Swing in Java is a GUI toolkit that includes the GUI components. Swing provides a rich set of widgets and packages to make sophisticated GUI components for Java applications. Swing is a part of Java Foundation Classes(JFC), which is an API for Java GUI programing that provide GUI. Th..
// 1.Class Declaration; // The code defines a class named 'RandomGame', which contains methods and variables // to implement the number guessing game. public class RandomGame { // 2. Instance Variables; // 'answer' This is an instance variable that will store the correct answer to the guessing game. It's initially set to -1. // 사용자가 입력하는 변수는 반드시 전역변수여야 한다. // 'sc' This is an instance of the 'Sca..

자료구조 (Data Structure) 자료구조는 컴퓨터 상 자료를 효율적으로 저장하기 위해 만들어진 논리적인 구조이다. 자료구조의 현명한 선택을 통해 효율적인 알고리즘을 사용할 수 있게 하여 성능을 향상시킨다. 자료구조의 분류 (Classification of Data Structure) 선형 구조 (Linear Structure) 데이터를 연속적으로 연결한 자료구조. 즉, 데이터 요소가 순차적 또는 선형으로 배열되고, 각 요소들이 이전 및 다음 elements와 붙어있는 구조를 선형 구조라고 한다. 종류로는 리스트, 스택, 큐, 데크가 있다. 비선형 구조 (Non - linear Data Structure) 데이터를 비연속적으로 연결한 자료구조. 즉, 데이터가 비순차적 또는 비선형적으로 배열되어 있다..
* 본 포스팅은 개인공부를 위한 오답노트입니다. * This posting is an incorrect answer note for personal study. 정적 메소드 선언 시 주의할 점 public class Car { int speed; void run() { System.out.println(speed + "으로 달립니다."); } public static void main(String[] args) { // speed = 60; Car myCar = new Car(); myCar.speed = 60; myCar.run(); } } 문제 정의 Static 메소드 선언 시, 내부에 인스턴스 필드 및 메소드 사용 불가 수정 new 연산자 사용해 객체를 생성한 후, 변수의 참조형태로 접근한다. 변수..
배열, 배열 리스트란? (What is Array and ArrayList?) 배열과 배열리스트는 자바에서 자주 쓰이는 데이터 구조이다. 배열은, 자바에서 제공하는 기본 기능인 반면 배열 리스트는 자바의 컬렉션 프레임워크의 컬렉션이며 java.utill package에 속한다. 배열 (Array) 배열은 동일한 데이터 타입만을 허용한다. 또한, 한 번 생성되면 크기를 변경할 수 없다. 배열 생성 방법 (Methods of Creating Arrays) int arr[] new int[10]; 배열 리스트 (ArrayList) 배열리스트는 List의 인터페이스를 상속받은 클래스로, 크기가 가변적으로 변하는 선형리스트다. 일반적인 배열과 같은 순차리스트이며, 인덱스로 내부의 객체를 관리한다는점이 유사하지만 ..
* 본 포스팅은 개인공부를 위한 오답노트입니다. * This posting is an incorrect answer note for personal study. Step.1 문제 정의 (Define the problem) 1 ~ 9의 숫자 중 3가지 숫자 입력 (중복 불가)2. 숫자와 자리가 모두 일치할 경우 Strike3. 자리는 일치하지 않지만 숫자는 일치할 경우 Ball4. 숫자와 자리 모두 일치하지 않을 경우 Out EX) 정답: 1 7 3 입력: 3 1 5 >>> 2b 입력: 1 5 6 >>> 1s Step.2 문제 분석 (Analyze the problem) 1. 랜덤 난수를 배열에 중복없이 입력하기 2. 컴퓨터 배열과 유저 입력 배열의 중복 확인하기 3. 스트라이크/볼 판정하기 Step.3 ..
보호되어 있는 글입니다.
/* Get and Set 1. private variables can only be accessed within the same class. 2. However, it's possible to access them if we provide public get and set methods. 3. get method returns the variable value, the set method sets the value. */ package GetterSetter; public class Person { private String name; //private = restricted access //Getter : returns the value of the variable name. public String..
자바를 공부한지 5일차? 사실 생성자, 클래스 개념이 애매했는데 이제야 가닥이 잡히는 것 같아서....심장이 떨린다 더 이해하고, 아는 게 많아질수록 더 깊이있게 배울 수 있을 것 같다. 혹여나, 코드를 잘못 해석했다면 지적해주세요...제발...ㅎㅎ 참조: https://wikidocs.net/225#_3 05-03 메서드 더 살펴보기 다른 프로그래밍 언어에는 함수가 별도로 존재한다. 하지만 자바는 클래스를 떠나 존재하는 것은 있을 수 없기 때문에 자바의 함수는 따로 존재하지 않고 클래스 내에 존재한다. 자바는… wikidocs.net 메소드 핵심 키워드 선언부, void, 매개 변수, 리턴문, 호출, 오버 로딩 핵심 포인트 메소드를 선언하고 호출하는 방법에 대해 알기 메소드 쉽게 이해하기 믹서를 떠올려..