Skip to content

Commit 4685065

Browse files
committed
Java
1 parent 07d19a4 commit 4685065

File tree

364 files changed

+5484
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

364 files changed

+5484
-0
lines changed

.metadata/.lock

Whitespace-only changes.

.metadata/.log

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
!SESSION 2020-11-06 22:24:39.351 -----------------------------------------------
2+
eclipse.buildId=4.16.0.I20200604-0540
3+
java.version=1.8.0_261
4+
java.vendor=Oracle Corporation
5+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=ko_KR
6+
Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product
7+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -data D:\JAVA\JavaProgrammingLecture -product org.eclipse.epp.package.java.product
8+
9+
!ENTRY org.eclipse.jface 2 0 2020-11-06 22:24:54.650
10+
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
11+
!SUBENTRY 1 org.eclipse.jface 2 0 2020-11-06 22:24:54.650
12+
!MESSAGE A conflict occurred for CTRL+SHIFT+T:
13+
Binding(CTRL+SHIFT+T,
14+
ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
15+
Open a type in a Java editor,
16+
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
17+
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@a4df251,
18+
,,true),null),
19+
org.eclipse.ui.defaultAcceleratorConfiguration,
20+
org.eclipse.ui.contexts.window,,,system)
21+
Binding(CTRL+SHIFT+T,
22+
ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
23+
,
24+
Category(org.eclipse.lsp4e.category,Language Servers,null,true),
25+
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@71e7830a,
26+
,,true),null),
27+
org.eclipse.ui.defaultAcceleratorConfiguration,
28+
org.eclipse.ui.contexts.window,,,system)
29+
30+
!ENTRY org.eclipse.egit.ui 2 0 2020-11-06 22:25:09.299
31+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
32+
user global configuration and to define the default location to store repositories: 'C:\Users\k'. If this is
33+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
34+
EGit might behave differently since they see different configuration options.
35+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
71 Bytes
Binary file not shown.

.metadata/.mylyn/.taskListIndex/write.lock

Whitespace-only changes.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
content_assist_proposals_background=255,255,255
2+
content_assist_proposals_foreground=0,0,0
3+
eclipse.preferences.version=1
4+
org.eclipse.jdt.ui.formatterprofiles.version=19
5+
spelling_locale_initialized=true
6+
useAnnotationsPrefPage=true
7+
useQuickDiffPrefPage=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jsch.core.hasChangedDefaultWin32SshHome=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
3+
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true
4+
org.eclipse.mylyn.tasks.ui.welcome.message=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
showIntro=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2020-11-06 22:25:08,029 [Worker-9: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<configuration scan="true">
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
4+
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
5+
</encoder>
6+
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
7+
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
8+
</filter>
9+
</appender>
10+
11+
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
12+
<File>${org.eclipse.m2e.log.dir}/0.log</File>
13+
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
14+
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
15+
<MinIndex>1</MinIndex>
16+
<MaxIndex>10</MaxIndex>
17+
</rollingPolicy>
18+
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
19+
<MaxFileSize>100MB</MaxFileSize>
20+
</triggeringPolicy>
21+
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
22+
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
23+
</encoder>
24+
</appender>
25+
26+
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
27+
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
28+
<level>WARN</level>
29+
</filter>
30+
</appender>
31+
32+
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
33+
</appender>
34+
35+
<root level="INFO">
36+
<appender-ref ref="FILE" />
37+
<appender-ref ref="STDOUT" />
38+
<appender-ref ref="EclipseLog" />
39+
<appender-ref ref="MavenConsoleLog" />
40+
</root>
41+
42+
<logger name="com.ning.http.client" level="INFO" />
43+
</configuration>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<state reopen="false"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<workingSetManager>
3+
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1604669097315_0" label="Java Main Sources" name="Java Main Sources"/>
4+
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1604669097356_1" label="Java Test Sources" name="Java Test Sources"/>
5+
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1604669102655_2" label="Window Working Set" name="Aggregate for window 1604669102654"/>
6+
</workingSetManager>

.metadata/version.ini

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Fri Nov 06 22:24:45 KST 2020
2+
org.eclipse.core.runtime=2
3+
org.eclipse.platform=4.16.0.v20200604-0540

Baekjoon/.classpath

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
4+
<classpathentry kind="src" path="src"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

Baekjoon/.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Baekjoon</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.release=disabled
12+
org.eclipse.jdt.core.compiler.source=1.8

Baekjoon/bin/Main.class

442 Bytes
Binary file not shown.

Baekjoon/bin/Main2.class

1.11 KB
Binary file not shown.

Baekjoon/src/Main.java

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import java.io.IOException;
2+
import java.util.*;
3+
4+
public class Main {
5+
6+
public static void main(String[] args) throws NumberFormatException, IOException {
7+
8+
9+
10+
11+
12+
13+
14+
}
15+
}

Baekjoon/src/Main2.java

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import java.util.Scanner;
2+
import java.io.IOException;
3+
4+
5+
public class Main2 {
6+
7+
public static void main(String[] args) throws NumberFormatException, IOException {
8+
// TODO Auto-generated method stub
9+
Scanner sc = new Scanner(System.in);
10+
int a = sc.nextInt();
11+
int [] arr = new int[a];
12+
for(int i=0;i<arr.length;i++) {
13+
arr[i]=sc.nextInt();
14+
}
15+
//¹öºí Á¤·Ä
16+
int temp;
17+
for(int i=0;i<arr.length;i++) {
18+
for(int j =0; j<arr.length-1;j++) {
19+
if(arr[j]>arr[j+1]) {
20+
temp=arr[j];
21+
arr[j]=arr[j+1];
22+
arr[j+1]=temp;
23+
24+
}
25+
}
26+
}
27+
for(int i=0;i<arr.length;i++) {
28+
System.out.println(arr[i]);
29+
}
30+
sc.close();
31+
}
32+
33+
}

Begin/.classpath

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
4+
<classpathentry kind="src" path="src"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

Begin/.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Begin</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.release=disabled
12+
org.eclipse.jdt.core.compiler.source=1.8

Begin/bin/Circle.class

865 Bytes
Binary file not shown.

Begin/bin/Main.class

1.02 KB
Binary file not shown.

Begin/bin/TwoDemensionArray.class

987 Bytes
Binary file not shown.

Begin/bin/array_delete.class

552 Bytes
Binary file not shown.

Begin/bin/array_insert.class

1.06 KB
Binary file not shown.

Begin/bin/array_practice.class

1.5 KB
Binary file not shown.

Begin/bin/array_practice2.class

1.47 KB
Binary file not shown.

Begin/bin/array_practice3.class

1.08 KB
Binary file not shown.

Begin/bin/charat_practice.class

1.23 KB
Binary file not shown.

Begin/bin/do_While_practice.class

682 Bytes
Binary file not shown.

Begin/bin/ex01.class

711 Bytes
Binary file not shown.

Begin/bin/exx01.class

618 Bytes
Binary file not shown.

Begin/bin/for_practice.class

975 Bytes
Binary file not shown.

Begin/bin/if_practice.class

936 Bytes
Binary file not shown.

Begin/bin/insert_mothod.class

1.56 KB
Binary file not shown.

Begin/bin/method_practice.class

957 Bytes
Binary file not shown.
882 Bytes
Binary file not shown.
1.08 KB
Binary file not shown.
1.93 KB
Binary file not shown.
854 Bytes
Binary file not shown.

Begin/bin/midmid/박수369.class

1 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.28 KB
Binary file not shown.
1.28 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

Begin/bin/midmid/원충돌.class

1.41 KB
Binary file not shown.

Begin/bin/switch_practice.class

947 Bytes
Binary file not shown.

Begin/bin/while_practice.class

1.01 KB
Binary file not shown.

Begin/src/Main.java

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//클래스 선언
2+
class Circle{
3+
//속성(field)
4+
int radius;
5+
String name;
6+
//Method(기능)
7+
void area() {
8+
//필드 와 지역변수를 구분해서 기억해야함.
9+
System.out.println(name+"의 면적은 "+radius*radius*3.14);
10+
11+
12+
}
13+
}
14+
15+
public class Main {
16+
17+
public static void main(String[] args) {
18+
System.out.println("클래스와 객체\n");
19+
Circle pizza = new Circle();//pizza 라는 객체생성
20+
pizza.radius=10;//필드값 저장
21+
System.out.println(pizza.radius); //참조
22+
System.out.println(pizza.name);
23+
pizza.name ="미스터피자"; //필드값 저장
24+
System.out.println();
25+
System.out.println(pizza.name+"\n");
26+
27+
//호출
28+
pizza.area();
29+
30+
}
31+
32+
33+
}

Begin/src/TwoDemensionArray.java

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import java.lang.reflect.Array; //2차원배열 쓸라면 이거 import 해야 하는것 같다.
2+
import java.util.Arrays;
3+
4+
public class TwoDemensionArray {
5+
6+
public static void main(String[] args) {
7+
// TODO Auto-generated method stub
8+
9+
int[][] arrMul = new int[3][2];
10+
arrMul[0][0]=10;
11+
arrMul[0][1]=100;
12+
13+
arrMul[1][0]=20;
14+
arrMul[1][1]=200;
15+
arrMul[2][0]=3000;
16+
arrMul[2][1]=300;
17+
18+
System.out.println("arrMUl[0] : "+Arrays.toString(arrMul[0]));
19+
System.out.println("arrMUl[1] : "+Arrays.toString(arrMul[1]));
20+
System.out.println("arrMUl[2] : "+Arrays.toString(arrMul[2]));
21+
22+
23+
}
24+
25+
}

Begin/src/array_delete.java

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.util.Arrays;
2+
import java.util.Scanner;
3+
public class array_delete {
4+
5+
public static void main(String[] args) {
6+
// TODO Auto-generated method stub
7+
Scanner sc = new Scanner(System.in);
8+
9+
10+
11+
}
12+
13+
}

Begin/src/array_insert.java

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import java.util.Arrays;
2+
import java.util.Scanner;
3+
4+
public class array_insert {
5+
6+
public static void main(String[] args) {
7+
// TODO Auto-generated method stub
8+
Scanner sc = new Scanner(System.in);
9+
int data[] = new int[100];
10+
int size = sc.nextInt();
11+
for (int i=0; i<size; i++) {
12+
data[i]=sc.nextInt();
13+
}
14+
15+
int position = sc.nextInt();
16+
int value = sc.nextInt();
17+
for (int i=size; i>position; i--) {
18+
data[i] = data[i-1];
19+
20+
}
21+
data[position] = value;
22+
size=size+1;
23+
24+
25+
26+
sc.close();
27+
28+
System.out.println(Arrays.toString(data));
29+
30+
31+
32+
33+
34+
}
35+
36+
}

Begin/src/array_practice.java

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import java.util.Arrays;
2+
import java.util.Scanner;
3+
public class array_practice {
4+
5+
public static void main(String[] args) {
6+
7+
String[] name = {"박찬호","이승엽","박병호","이병규","류현진"};
8+
Scanner sc = new Scanner(System.in);
9+
int[] score = new int[5];
10+
System.out.printf("%s 의 점수 입력",name[0]);
11+
score[0]=sc.nextInt();
12+
System.out.printf("%s 의 점수 입력",name[1]);
13+
score[1]=sc.nextInt();
14+
System.out.printf("%s 의 점수 입력",name[2]);
15+
score[2]=sc.nextInt();
16+
System.out.printf("%s 의 점수 입력",name[3]);
17+
score[3]=sc.nextInt();
18+
System.out.printf("%s 의 점수 입력",name[4]);
19+
score[4]=sc.nextInt();
20+
21+
System.out.printf("%s 의 점수 는 \t %.2f\n",name[0],(double)score[0]);
22+
System.out.printf("%s 의 점수 는 \t %.2f\n",name[1],(double)score[1]);
23+
System.out.printf("%s 의 점수 는 \t %.2f\n",name[2],(double)score[2]);
24+
System.out.printf("%s 의 점수 는 \t %.2f\n",name[3],(double)score[3]);
25+
System.out.printf("%s 의 점수 는 \t %.2f\n",name[4],(double)score[4]);
26+
27+
28+
29+
30+
31+
double avg = (double)(score[0]+score[1]+score[2]+score[3]+score[4])/score.length;
32+
System.out.printf("---------------\n 평점 : \t %.2f",avg);
33+
sc.close();
34+
35+
System.out.println();
36+
37+
38+
39+
40+
}
41+
42+
}

0 commit comments

Comments
 (0)