Java
-
모든 폰트 보기Java 2019. 5. 10. 17:38
import java.awt.Font; import java.awt.GraphicsEnvironment; public class AllFontView { public static void main(String[] args) { GraphicsEnvironment ge = null; ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fonts = ge.getAllFonts(); for (int i = 0; i < fonts.length; i++) { System.out.println(fonts[i].getFontName()); } } }
-
세차계산 2Java 2019. 4. 12. 17:36
import java.util.Scanner; public class GanjiEx02 { public static void main(String[] args) { String gan[] = "갑(甲),을(乙),병(丙),정(丁),무(戊),기(己),경(庚),신(辛),임(壬),계(癸)".split(","); String ji[] = "자(子),축(丑),인(寅),묘(卯),진(辰),사(巳),오(午),미(未),신(申),유(酉),술(戌),해(亥)".split(","); String color[] = "청(靑),청(靑),적(赤),적(赤),황(黃),황(黃),백(白),백(白),흑(黑),흑(黑)".split(","); String ddi[] = "쥐,소,호랑이,토끼,용,뱀,말,양,원숭이,닭,개,돼지".split(",");..
-
세차 계산1Java 2019. 4. 12. 17:29
public class GanjiEx01 { public static void main(String[] args) { String gan[] = "갑(甲),을(乙),병(丙),정(丁),무(戊),기(己),경(庚),신(辛),임(壬),계(癸)".split(","); String ji[] = "자(子),축(丑),인(寅),묘(卯),진(辰),사(巳),오(午),미(未),신(申),유(酉),술(戌),해(亥)".split(","); int gCount = 0; int jCount = 0; for(int i=0;i
-