Program이란?
해야 할 일을 미리 기술해 놓은 것
Programming?
인간의 언어
↓ 번역(프로그래머)
프로그래밍 언어 : C, C++, Java, Python, SQL, ..., HTML, ...
↓ 번역(software : compiler, interpreter, ...)
기계어
List of programming languages
https://en.wikipedia.org/wiki/List_of_programming_languages
-> Alphabetical
-> Categorical
-> Chronological
-> Generational
Interpreted vs Compiled Programming Languages
https://guide.freecodecamp.org/computer-science/compiled-versus-interpreted-languages/
========================================
https://docs.oracle.com/javase/tutorial/getStarted/intro/index.html
Notepad++ 다운로드 및 설치
환경 변수 이해 : where 명령, set 명령과 path 환경변수
Java 환경 설정
~ 프로그래밍 환경 설정.txt
-> Adoptium JDK
~ https://en.wikipedia.org/wiki/Adoptium
-> Eclipse 2022-12 (4.26)
~ workspace ≒ 폴더
~ project ≒ 폴더
~ package ≒ 폴더
https://docs.oracle.com/javase/tutorial/java/concepts/index.html
What Is an Object?
What Is a Class?
C:\Users\user> del Bicycle*
C:\Users\user> notepad Bicycle.java
C:\Users\user> javac Bicycle.java
C:\Users\user> dir Bicycle*
C:\Users\user> notepad BicycleDemo.java
C:\Users\user> javac BicycleDemo.java
C:\Users\user> dir Bicycle*
C:\Users\user> java Bicycle -- 에러
C:\Users\user> java BicycleDemo -- 성공
In object-oriented terms, we say that your bicycle is
an instance of the class of objects known as bicycles.
자바 코딩할 때 주의할 점
-> 클래스명과 파일명은 반드시 일치해야 한다
-> 파일 확장자는 반드시 .java로 끝나야 한다
명명 규칙 : https://n-square.tistory.com/97
-> 클래스 : PascalCase
-> 변수 : camelCase
-> 메소드 : camelCase
What Is Inheritance?
What Is an Interface?
What Is a Package?
A package is a namespace for organizing classes
and interfaces in a logical manner
접근 제한자
What is a driver class? (Java)
https://stackoverflow.com/questions/765751/what-is-a-driver-class-java
The Java™ Tutorials : https://docs.oracle.com/javase/tutorial/
헤드퍼스트 자바 : http://www.yes24.com/Product/Goods/1809610
초보자를 위한 Java Programming : http://www.yes24.com/Product/Goods/19882397 -> https://www.youtube.com/watch?v=k2QbZCXfD1w&list=PLuvImYntyp-tiWNGQl22GO1KtVvUKZsZ6
** Do it! 자바 완전 정복, 이것이 자바다 등의 도서는 다른 도서에 비해 자바를 좀 더 상세하게 설명합니다
이것이 자바다 : http://www.yes24.com/Product/Goods/112208302 -> https://www.youtube.com/playlist?list=PLVsNizTWUw7EmX1Y-7tB2EmsK6nu6Q10q
Do it! 자바 완전 정복 : http://www.yes24.com/Product/Goods/103389317 -> https://www.youtube.com/playlist?list=PLG7te9eYUi7toebNnbA1cZNRDoUcHmsGd
GoF 디자인 패턴 : http://www.yes24.com/Product/Goods/17525598
헤드퍼스트 디자인 패턴 : http://www.yes24.com/Product/Goods/108192370
자바 객체지향 디자인 패턴 : http://www.yes24.com/Product/Goods/12501269
객체지향의 사실과 오해 : http://www.yes24.com/Product/Goods/18249021 -> https://it-mesung.tistory.com/m/category/객체지향, https://techblog.woowahan.com/2502/
Refactoring.Guru : https://refactoring.guru/
Clean Code 클린 코드 : http://www.yes24.com/Product/Goods/11681152
자바로 배우는 리팩토링 입문 : http://www.yes24.com/Product/Goods/55147071
Others
Do it! 알고리즘 코딩 테스트 자바 편 (2022년 04월 05일)
http://www.yes24.com/Product/Goods/108571508
-> 저자 강의 : https://www.youtube.com/playlist?list=PLG7te9eYUi7tAQygBknaTciy8wzLCe-Ll
https://www.explainthatstuff.com/typewriter.html
=====================================
01장 자바 개요
- 할당 연산자와 비교 연산자 대비
C++, Java Pascal, PL/SQL Basic, PowerScript
할당 a = 100 a := 100 a = 100
비교 a == 100 a = 100 a = 100
- Control Flow Statements
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/flow.html
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/QandE/questions_flow.html
-> decision-making statements : if, switch
- hashing is ____!
- https://aahc.tistory.com/6
-> looping statements : for, while, do-while
-> branching statements : break, continue, return
- Math.random()
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html
cf.Pseudo Random and True Random
https://www.w3schools.com/python/numpy/numpy_random.asp
02장 스토리 기반 객체 지향 프로그래밍 이해
- 상속, 오버라이딩, 다형성, 추상 클래스, ...
- Guessing Game
03장 변수 : Primative vs Reference
- Variables
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html
- Primative data type : byte, short, int, long, float, double, char, boolean
- Reference data type : Class, Interface, Array, Enum
- Variables
- Instance Variables (Non-Static Fields|Variables, 필드)
- Class Variables (Static Fields|Variables, 정적 필드)
- Local Variables
- Parameters
04장 메소드와 인스턴스 변수
- Methods use Instance variables
- Encapsulation, Getters, Setters
- String 클래스 : == vs equals -> https://coding-factory.tistory.com/536
05장 메소드 : 게임 프로그래밍
- eXtreme Programming 방법론
- High-level design -> prep code -> test code -> real code
06장 자바 라이브러리 : 게임 프로그래밍
- ArrayList 클래스
** Array
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
07장 상속, 다형성
- Inheritance
- provides a powerful and natural mechanism
for organizing and structuring your software
- avoids duplicate code
- defines a common protocol for a group of classes
- enables use of polymorphism
- Polymorphism : 상위 타입(클래스 혹은 인터페이스)의 참조 변수로 하위 타입의 모든 객체를 참조할 수 있다.
- Overriding vs Overloading
08장 다형성, 인터페이스
- abstract class, abstract method
- Object class, Casting
- interface
-> Default Method, Static Method
- https://atoz-develop.tistory.com/entry/JAVA-8-interface-default-키워드와-static-메소드
- http://kbs0327.github.io/blog/technology/java8-default-interface/
- https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html
- Head First Design Pattern
-> 1장 Strategy pattern, 2장 Observer pattern, ...
-> 과제 : Strategy pattern을 적용한 프로그램을 작성해서 보내주세요
09장 생성자, 가비지 컬렉션
- Stack, Heap 메모리
- Constructor
10장 Static, Wrapper Class
- Math, Integer, Character, ..., String, Calendar, ...
11장 Exception Handling
- Logic Error
- 일반 예외(Exception) = Syntax Error
- 실행 예외(Runtime Exception) = Runtime Error
-> https://mozi.tistory.com/550
-> https://www.w3schools.com/java/java_try_catch.asp
12장 Swing 1 -> AWT, Swing ... JavaFX
13장 Swing 2 -> BeatBox.java
14장 I/O
15장 Networking and Multithread
16장 Data Structures: Collections Framework and Generics
17장 Deployment -> package 이해
18장 Distributed Computing
직접 작성
Eclipse 코드 자동 완성
Lombok 활용 : https://advenoh.tistory.com/24
(0) Lombok 다운로드 및 임의의 폴더에 붙여넣기
https://projectlombok.org/download
프로젝트 폴더 아래 임의의 폴더(예를 들어 lib)를 생성한 뒤 lombok.jar 붙여넣기
(1) 프로젝트에 Lombok 클래스패스 설정
프로젝트 이름 우클릭 -> Build Path -> Configure Build Path... -> Libraries -> (Classpath) -> Add JARs -> lombok.jar 찾아서 선택
(2) Enable lombok for Eclipse
https://www.vogella.com/tutorials/Lombok/article.html
lombok.jar 파일이 있는 곳에서 실행 : java -jar lombok.jar
-> Can't find IDE 경고창 확인 클릭
-> Specify location에서 eclipse 폴더 설정
-> Install/Update 클릭
-> Quit Installer 클릭
참고.lombok 삭제
https://standard-stereotype.tistory.com/2
참고.Eclipse 2021-06에서 lombok 에러 해결 방법
https://shanepark.tistory.com/205
(3) Eclipse 재시작 및 "Lombok 활용 프로젝트 rebuild"
https://dololak.tistory.com/63
(4) 연습
-----------------------
> ElectricGuitar.java <
-----------------------
import lombok.Data;
@Data
public class ElectricGuitar {
private String brand = "야마하";
private int numOfPickups;
private boolean rockStarUsesIt;
}
---------------------------
> ElectricGuitarMain.java <
---------------------------
public class ElectricGuitarMain {
public static void main(String[] args) {
ElectricGuitar guitar = new ElectricGuitar();
guitar.setBrand("야마하");
System.out.println(guitar.getBrand());
System.out.println(guitar.toString()); // 객체의 현재 state 확인!
System.out.println(guitar);
}
}
=========================================
** generic type = parameterized type
https://docs.oracle.com/javase/tutorial/java/generics/index.html
https://www.geeksforgeeks.org/generics-in-java/
Type : Class, Interface, Enum
Formal parameter vs Actual Argument
Type parameter vs Type Argument
(Type variable)
Bounded Type Parameter
Upper Bounded Wildcards
Unbounded Wildcards
Lower Bounded Wildcards
-> 다음 두가지는 같은 것임
public void takeThing(ArrayList list)
public void takeThing(ArrayList<? extends Animal> list)
public void takeThing(ArrayList one, ArrayList two)
public void takeThing(ArrayList<? extends Animal> one, ArrayList<? extends Animal> two)
Type Erasure
relatively prime(서로소)
https://docs.oracle.com/javase/tutorial/collections/index.html
https://velog.io/@jakeseo_me/이것이-자바다-정리-15-컬렉션-프레임워크
Data Structure, 자료 구조
Java collections framework
https://www.geeksforgeeks.org/collections-in-java-2/
List interface:
ArrayList
LinkedList
Vector -> https://reakwon.tistory.com/153
Stack
Queue interface:
PriorityQueue
Deque(Double-ended Queue) interface:
ArrayDeque
Set interface:
HashSet
LinkedHashSet
SortedSet interface:
TreeSet -> https://moreget.github.io/dev-00000054-Java-Comparable/
Map interface:
HashMap -> https://reakwon.tistory.com/151
HashTable -> https://reakwon.tistory.com/152
Comparable 인터페이스 vs Comparator 인터페이스
https://docs.oracle.com/javase/tutorial/java/javaOO/nested.html
Static nested class
Non-static nested class = Inner Class
Lambda Expressions
https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
A functional interface is any interface that contains only one abstract method.
-> https://codechacha.com/ko/java8-functional-interface/
https://bombichun.tistory.com/entry/JAVA람다와-스트림Lambda-Stream
-> https://youtu.be/Qzx8wa_k5Bw : 이것이 자바다 - 14.5 표준 API의 함수적 인터페이스
Function 함수적 인터페이스 : Function 함수적 인터페이스 예제.txt
Java AndThen, Compose 사용 : https://moreget.github.io/dev-00000064-Java-ConsumerAndThen/
Method Reference : https://codechacha.com/ko/java8-method-reference/
When to Use
https://docs.oracle.com/javase/tutorial/collections/streams/index.html
https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html
https://freedata.tistory.com/12
-> https://youtu.be/2D9NRBIKKCc : 이것이 자바다 - 16.1 스트림 소개
https://docs.oracle.com/javase/tutorial/essential/io/index.html
Serializable Objects
https://docs.oracle.com/javase/tutorial/jndi/objects/serial.html
https://docs.oracle.com/javase/tutorial/essential/concurrency/index.html
=====================
-> https://victorydntmd.tistory.com/291
-> https://m.blog.naver.com/ljh0326s/221113248565
https://effectiveprogramming.tistory.com/category/3.객체지향%28OOP%29%20개념
========================
https://www.programiz.com/java-programming/examples
이것이 자바다개정판확인문제+정답.pdf
https://codechobo.tistory.com/1
https://www.geeksforgeeks.org/collections-in-java-2/
https://swalloow.tistory.com/40
https://programmers.co.kr/learn/challenges
=================================