본문 바로가기
728x90
반응형

분류 전체보기712

[Javascript] JSTL리스트 배열로 담기 2017. 1. 18.
[Java] 변수 선언 및 값 할당 출처http://dpug.tistory.com/33#.WH35tlWLSpp * 변수 선언 및 값 할당 *v변수에 값(상수) 할당§“=“ 연산자 사용§오른쪽에서 왼쪽으로 할당§변수끼리도 할당 가능§변수에 값이 존재 하더라도 다른 값을 할당하면 마지막 할당된 값이 할당(Update)§할당의 예§선언과 할당을 분리 : int a; a = 100;§선언과 할당을 동시에 : int a = 100;§동일한 자료형인 경우 여러 개를 분리하여 선언과 할당 : int a, b; a = 100, b= 200;§동일한 자료형인 경우 여러 개를 동시에 선언과 할당 : int a = 100, b = 200;§변수끼리의 할당 : int a, b; a = 100; b = a; * 연산자(Operator) *v자바의 연산자는 대부분.. 2017. 1. 17.
[Java] 번호리스트에서 같은 번호 제외하고 카운트 // 화면에서 받아온 번호리스트에서 같은 번호 제외하고 카운트int tempArtnumListCnt = 0;String tempArtnum = "";for(String artnum: artnumList){if(!tempArtnum.equals(artnum)){tempArtnumListCnt++;tempArtnum = artnum;}}logger.debug("artnumListCnt ==" + tempArtnumListCnt);String artnumListCnt = Integer.toString(tempArtnumListCnt); 2017. 1. 13.
ArrayList 중복 카운트 출처http://www.cremazer.zz.mu/?p=1020 import java.util.ArrayList;import java.util.Arrays; public class Test { public static void main(String[] args) { /** 원본 데이터 */ int[] data = {10,3,4,50,4,4,1,2,10,10,25,2,10}; /** 원본 데이터 유형 */ ArrayList itemList = new ArrayList(); /** 원본 데이터 유형별 중복개수 */ ArrayList cntList = new ArrayList(); //1. 데이터 유형 및 개수를 설정한다. for(int index = 0 ; index < data.length ; index+.. 2017. 1. 13.
[Java] ibatis배열 private String[] achList; public String[] getAchList() { return achList; } public void setAchList(String[] AchList) { this.achList = achList; } #achList[]# 2017. 1. 12.
728x90
반응형