본문 바로가기

IT/JAVA

이클립스 루나 테마,배경 바꾸기 ( DARK ) 1. 루나를 시작한다. window > preferences 를 클릭한다. 2. general > appearance 를 누르고 theme을 dark 로 바꾼다. color and font theme 을 바꾸면 글씨 색등이 바뀐다.. 3. 추가로 배경도 검정으로 바꾸자. 4. 완전체!! 루나 TOP 10 정보 링크 더보기
JAVA Date, Calendar - P import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date; public class DateTest { public static void main(String[] args) throws Exception { Date date = new Date(); System.out.println("Date = "+date); SimpleDateFormat day = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println("yyyy-MM-dd HH:mm:ss = "+day.format(date)); SimpleDateFormat day1 = new SimpleDateForm.. 더보기
JAVA 파일 입출력 - P import java.io.BufferedReader;import java.io.FileReader;import java.io.FileWriter;import java.io.IOException; public class iotest { public static void main(String[] args) throws IOException { FileWriter fw = new FileWriter("C:\\Users\\user\\Desktop\\aaa\\test.txt",true); // test.txt 파일이 없으면 새로 생성. // boolean이 false면 선언시 새로 생성, true면 이어서 fw.write("테스트"); // 파일에 "테스트"저장 fw.close(); BufferedReader .. 더보기
JAVA 파일 압축 - P import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream; public class Zip { // 압축할 파일 디렉토리 경로 String path = null; File f = null; File[] fileList = null; // 압축 파일을 저장할 디렉토리 경로 및 압축 파일 명 String zipFileName = null; public static void main(String[] args) throws Exception { Zip zip = new Zip(); zip.createZipFile("C:\\Users\\user\\Desktop\\aa\\", "C:\\Users\\user\\Desktop", .. 더보기
JAVA 배열 sort - P package test;import java.util.ArrayList;import java.util.Collections;import java.util.Iterator;import java.util.ListIterator; public class sort { private static String[] values = { "3333", "3331", "1111", "5555", "4444", "2222", "6666", "2323", "5666" }; public static void main(String[] args) { ArrayList lists = new ArrayList(); // ArrayList 에 데이터 추가 for (String v : values) { lists.add(v); } // .. 더보기