본문 바로가기

전체 글

(220)
[JAVA] 특정 포맷에 맞게 설정 Format DecimalFormat(): 10진수 양식 변경 원한는 양식으로 변경하는 예제 import java.text.DecimalFormat; // import java.text.*; public class CommaTest { public static void main(String[] args) { DecimalFormat df = new DecimalFormat("###,###,###"); String pay = df.format(1500000); System.out.println("급여: " + pay + " 원"); //급여: 1,500,000 원 } }
[JAVA] toUpperCase, toLowerCase, length JAVA API에서 기본제공되는 매서드 toUppertoUpperCase(): 대소문자 구분없이 대문자로 출력 toLowerCase(): 대소문자 구분없이 소문자로 출력 length(): 문자길이 출력 public class DateTest { public static void main(String[] args){ String str = "Software Korea"; System.out.println(str.toUpperCase()); //대문자로 출력 System.out.println(str.toLowerCase()); //소문자로 출력 System.out.println(str.length()); //문자의 길이 출력 } }
[JAVA] 문자열자르기 substring 문자열 자르기(substring): 첫번째 자리가 0부터 시작 "가나다라마바".substring(0,3); 으로 값을 출력 할 경우 0부터 3이전까지 산출 가나다라마바 0 1 2 3 4 5 결과: 가나다 예제 public static void main(String[] args){ String str = "Software Korea"; String msg = str.substring(0,8); // 0 ~ 7: 8개 System.out.println(msg); // Software 출력됨 System.out.println(str.substring(9,14)); // Korea 출력됨 }
[JAVA] JAVA API문서 JAVA API문서 http://docs.oracle.com/javase/7/docs/api Java Platform SE 7 docs.oracle.com 버전에 따라 url의 숫자를 변경해주면 됩니다. 위 링크는 JDK7 버전
[JAVA] 데이터 타입 크기 Data Type Data Memory Minimum Value Maximum Value boolean boolean 8 bits - - byte integer 8 bits -128 127​ char charactor 16 bits Unicode 0 Unicode 65535​​ short integer 16 bits -32768 32767 int integer 32 bits -2147483648 2147783647 long integer 64 bits -9223372036854775808 9223372036854775807 float real 32 bits -3.402824 x 10^38 3.402824 x 10^38 double real 64 bits -1.79769313486232 x 10^308 1..
[개발 IT] jdk-8u5-windows-i586.exe - 시작 지점 없음 오류 프로시저 시작 지점 RegDeleteKeyExA을(를) DLL ADVAPI32.dll에서 찾을 수 없습니다. Windows XP 환경에서는 Java SE 8버전이 설치되지 않는다. 따라서 Java SE 7버전 이하로 설치해야 한다.
[개발 IT] JVM 메모리 구조 메서드 영역 (Method Area) 클래스 데이터, 클래스변수(static변수) 호출 스택 (Call Stack) Main메서드, 지역변수 힙 (Heap) 인스턴스, 인스턴스 변수(static을 제외한 다른 변수)
[개발 IT] Invalid project description - overlaps the location of another project 프로젝트 Import 할때 발생되는 에러 문제 workspace가 아닌 곳에서 import 후에 파일을 workspace로 옮겨 import 할 경우 발생한다. (기존에 import한 위치가 아닌 변경된 위치에서 import할 경우 발생) Invalid project description - overlaps the location of another project 해결방법 방법1. File -> project -> Import -> General -> Existing Projects into Wokspace 방법2.(안드로이드 프로젝트 일경우) File -> project -> Import -> General -> Existing Existing Android Code into Wokspace 위 방법으..