목록전체 글 (7719)
투케이2K

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity21 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[toUpperCase, toLowerCase - 전체 영어 대문자, 소문자 변경 실시]"); //초기 영어문자가 포함된 변수 선언 실시 (대문자, 소문자 혼용) String data = ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.Arrays; public class MainActivity20 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[Character.isDigit 숫자 및 문자 여부 확인]"); //문자 및 숫자 여부를 확인할 초기 변수 선언 String data = "5..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.Random; public class MainActivity19 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[Random 랜덤 정수값 - Random 객체를 사용해 1부터 10까지 무작위 랜덤 정수값 출력 실시]"); //랜덤 정수값을 저장할 변수..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.io.UnsupportedEncodingException; import java.util.Arrays; public class MainActivity18 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[바이트 및 문자열간 데이터 포맷 getBytes, new ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; import java.util.Arrays; import java.util.Random; public class MainActivity9 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[lotto 로또 프로그램 (랜덤 번호 생성 및 당..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.text.SimpleDateFormat; import java.util.Date; public class MainActivity8 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[SimpleDateFormat 날짜 포맷 출력 - 현재 날짜,시간,요일 확인 실시]"..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; import java.util.HashSet; public class MainActivity17 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[HashSet 배열 중복 데이터 제거 - HashSet 사용해 ArrayList 배열 중복..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity16 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[화폐(돈)단위표시 - String.format사용해 화폐단위 콤마 표시 실시]"); //초기 변수 선언 int money = 10000; /*[설 명] * 1. String.format ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity12 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[Integer.parseInt, Integer.toString 데이터 형변환 - string to int, int to string 간 데이터 형변환 실시]"); //초기 String, ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity13 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[split 문자열 분리 - 특수문자인 ,(콤마) 기준으로 문자열 분리 실시]"); //콤마를 포함하고 있는 초기 문자열 선언 String data = "안녕,하세요,반갑습니다"; //문자..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity14 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[substring 문자열 자르기 - 문자열 범위 자르기 및 문자열 기준 자르기 실시]"); //초기 문자열 변수 선언 String data = "안녕하세요"; /*[설 명] * 1. 문자..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity15 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[charAt 특정 위치 문자 추출 - charAt을 사용해서 한글자씩 문자열 분리하기]"); //초기 변수 선언 실시 String data = "투케이"; /*[설 명] * 1. char..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity10 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[최소공배수, 최대공약수 - while문을 사용해 최소공배수, 최대공약수 구하기 실시]"); int one=4; //첫번째 정수값 int two=8; //두번째 정수값 int multipl..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; public class MainActivity11 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[약수구하기 - for문 사용해서 약수구하기 실시]"); //약수를 구하려는 초기 변수 선언 int data = 8; //약수 값을 담으려..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; public class MainActivity3 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[ArrayList contains, indexOf - 배열에 특정 값 포함 여부 확인 및 위치 확인]"); //초기 ArrayList 선언..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; public class MainActivity6 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[소인수분해 - for문과 while문 사용해 소인수분해 실시]"); //소인수분해를 하기 위한 초기 변수 선언 int data = 135;..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.ArrayList; public class MainActivity5 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[소수 구하기 - 이중 for문을 사용해 1부터 10까지 소수구하기]"); //소수값을 담기위한 배열 선언 ArrayList list = n..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; import java.util.Arrays; public class MainActivity2 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[최소값(min), 최대값(max) - Arrays.stream 사용해 최소값(min), 최대값(max) 구하기]"); //초기 배열 선언 및 데..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package Al; public class MainActivity { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("[삼각형 별찍기 - 이중 for문을 사용해서 삼각형 모양 별찍기 실시]"); /*[설 명] * 1. 부모 for문 i 변수 : 삼각형을 그리기 위한 가로 행을 선언합니다 * 2. 자식 for문..

/* =========================== */ [ 설 명 ] 개발 언어 : Java 기본 설명 : - 상수(constant)란 데이터를 저장할 수 있는 메모리 공간을 의미합니다 특징 설명 : - 상수가 변수와 다른 점은 프로그램이 실행되는 동안 메모리에 저장된 데이터를 변경할 수 없습니다 - 상수는 변수와 마찬가지로 이름을 가지고 있는 메모리 공간으로, 이러한 상수는 선언과 동시에 반드시 초기화해야 합니다 - final 키워드를 사용한 상수는 선언과 함께 반드시 초기화해야 합니다 (final int AGE = 30;) /* =========================== */