본문 바로가기

2015/04

목이 뻐근타 /** * @author aram.park * 주어진 배열을 시계방향으로 90도 회전시켜서 출력하는 프로그램 * */public class Excercise5_9 { public static void main(String[] args) { char[][] star = { { '*', '*', ' ', ' ', ' ' }, { '*', '*', ' ', ' ', ' ' }, { '*', '*', '*', '*', '*' }, { '*', '*', '*', '*', '*' } //[4][5] }; char[][] result = new char[star[0].length][star.length];//[세로][가로] for (int i = 0; i 더보기
Bizreach 2014 " target="_top" class="tx-link"> 더보기
주말엔 취미로 프로그래밍 더보기
배열가지고놀기 package javatry.privates.enjoy.new2015.windows.lesson.chapter09; import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; /** * @author aram.park */public class Heikin2 { public static void main(String[] args) { int[] ten = new int[3]; double heikin = 0; int sum = 0; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.println.. 더보기
Object Class package javatry.privates.enjoy.new2015.windows.lesson.chapter09; /** * @author aram.park */public class Heikin7 { public static void main(String[] args) { Kamoku[] kamoku = { new Kamoku("国語", 63), new Kamoku("数学", 90), new Kamoku("英語", 75), new Kamoku("理科", 45), new Kamoku("会社", 81) }; //新しくKamokuのクラス中のメッソドについての配列? int sum = 0; for (int i = 0; i < kamoku.length; i++) { // for(int i : kamoku) エラー.. 더보기
배열에서 쓰는 확장for문 /** * @author aram.park */public class Heikin3 { public static void main(String[] args) { int[] ten; int sum; double heikin; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * @author aram.park */ public class Heikin2 { public static void main(String[] args) { int[] ten = new int[3]; double heikin = 0; int sum = 0; BufferedReader reader = new Buffe.. 더보기
java 8 메소드 연습문제 중 string class,배열 사용하는 방법 내가 실행한 코딩 public static String[] getYourName() { String[] iWantYourName = { "結城", "浩" }; return iWantYourName; } public static void main(String[] args) { String[] IwantYourName = getYourName(); System.out.println("名字は" + IwantYourName[0]); System.out.println("名前は" + IwantYourName[1]); } //배열 안쓰고 개발하는 다른 방법(동기들이 썼던 코딩) // public static String getYourName(StringBuilder myoji,StringBuilder namae) {.. 더보기
자바연수)4월 23일 _메소드 /** * @author aram.park */public class Q8_5 { public static String[] getYourName() { String[] iWantYourName = { "結城", "浩" }; return iWantYourName; } public static void main(String[] args) { String[] IwantYourName = getYourName(); System.out.println("名字は" + IwantYourName[0]); System.out.println("名前は" + IwantYourName[1]); } } -----public class Q8_2 { public static void main(String[] args) { for (i.. 더보기
자바연수)7-21 문제 개별코딩 import java.io.*;import java.util.*; /** * @author aram.park *///class Saving {// private String text;//// public void setSave(String text) {// this.text = text;// }//// public String getSave() {// return this.text;// }//}public class test9 { public static ArrayList list = new ArrayList(); public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(S.. 더보기
JAVA String 클래스 생성자와 메서드 정리 자바/Java String클래스 생성자와 메서드 정리 1. substring String substring(int begin) String substring(int begin, int end) 한 문자열에서 내용의 일부를 추출하는 메서드 주어진 시작위치(begin)부터 끝 위치(end) 범위에 포함된 문자열을 얻는다. String s = "java.lang.Object"; String c = s.substring(10); c = "Object" String p = s.substring(5,9); p = "lang" substring(int start , int end)를 사용할 때 주의해야할 점은 매개변수로 사용되는 문자열에서 각 문자의 위치를 뜻하는 index가 0부터 시작한다는 것과 start부터 e.. 더보기