전체 글 1439

hashmap 의 value에 다른 배열 넣기/value에 값 여러개 주기

http://k.daum.net/qna/openknowledge/view.html?qid=40E4V HashMap에 HashMap을 이용해서 값을 추가 할 수 있습니다. HashMap에 putAll 메소드에 HashMap을 넣어주면 추가가 됩니다. 아래는 2개의 HashMap을 생성한 다음에 putAll로 map2의 값들을 map으로 모두 추가한 샘플 입니다. public static void main(String[] args) { Map map = new HashMap(); map.put("A", "aaa"); map.put("B", "bbb"); map.put("C", "ccc"); Map map2 = new HashMap(); map2.put("D", "ddd"); map2.put("E", "eee..

자바API문서??

[자바의 정의] 자바를 한마디로 표현하기란 매우 어렸다. 그러나 다음과 같은 특징들을 통해 자바가 어떤 언어이며 자바에 대한 이해를 얻을 수 있을 것이다. sample, object-oriented, distributed, interpreted, robust, secure, architecture, natrural, protable, high-performance, multithreaded, and dunamic language. 1. 다른 언어에 비해 코딩이 간단하다. 즉, 똑같은 기능을 하는 프로그램을 기존의 프로그래밍인 C나 C++의 코드로 작성한 것과 자바로 작성한 것을 비교해 보았을 때 자바로 작성한 것이 코드의 길이가 훨씬 간단하면서도 같은 기능을 수행한다. 그리고 자바언어 는 기존의 C언어에..

참고사이트

소프트웨어 공학연구소 http://www.soen.kr/ 테라시아 https://gs.saro.me/ c/c++자료 多 http://www.joinc.co.kr/modules/moniwiki/wiki.php/FrontPage 개발관련 뉴스 http://www.zdnet.co.kr/ 컴퓨터용어 검색 http://whatis.techtarget.com/ c++언어 만든사람 홈페이지 http://www.stroustrup.com/ 스칼라 듀토리얼? http://docs.scala-lang.org/ko/tutorials/scala-for-java-programmers.html 자바 한글 듀토리얼? https://github.com/yakmoz/ref/blob/master/java/java%208%20tutori..

request.getParameterValues,URLEncoder.encode

//연동 정보 생성! (받는 값이 배열이 아닐때)String goodname = request.getParameter("good_name") == null ? "" : request.getParameter("good_name"); //인코딩해서 변수에 저장data += "&" + URLEncoder.encode("goodname", "UTF-8") + "=" + URLEncoder.encode(goodname, "UTF-8"); 근데 배열로 정보를 저장해야할 땐!!!!!! 근데 배열로 정보를 저장해야할 땐........................... String goodname[] = {""}; if(request.getParameterValues("good_name") != null ){ goodn..

request.getParameterValues/삼항연산자 ? :

String goodname = request.getParameter("good_name") == null ? "" : request.getParameter("good_name"); 배열아닐때 소스 1)​ String goodname[] = {""}; if(request.getParameterValues("good_name") != null ){ goodname = request.getParameterValues("good_name"); } 문자열 형식의 goodname이라는 이름의 배열 선언. 값은 아직 없음만약 good_name이라는 객체가 null이 아니라면실행한다.{goodname배열에 good_name객체들을 넣는다}맞나...뭐여.. 2)​String[] goodname = request.get..

${ } , c:forEach ,객체와 스트링의 차이 , 스트링과 스트링버퍼의 차이

$ { }jsp소스를 보면 ${ } 이렇게 해놓고 안에 무언가 써놓은 부분이 있는데어디선가 같은 이름의 값을 가져오는 것이라고는 생각했지만어제 무슨 뜻 인지 알게 되었다.html에서 자바 변수,클래스를 받아올 때 ${ }이렇게 쓰는 것이라고 한다${goodname} 이런 식. c:forEach ${article.title2} 1권 ${article.price}원 ${fn:substring(article.user_id, 0, fn:indexOf(article.user_id,"@")-2)}** 이런 소스가 있다고 할 때 forEach는 반복문이다. orderList라는 객체를 통으로 받아오고자 할때 article은 저 orderList의 별명?이름이 되는 것이다.. http://blog.daum.net/aq..

member mb = memberDao.getInstance().getMember(member_id);

1 2 3 4 5 6member mb = memberDao.getInstance().getMember(member_id);라는 소스가 있다고 할 때 1 . member 는 member.java라는 파일의 내용을 통째로 가져올 빈통2 . mb는 변수명. member라는 객체를 가지고 있다.3 . memberDao. 경로 ?4 . getInstance(). memberDao안에 getInstance()라는게 있을 것이다.5 . getMember public member getMember(String member_id) throws SQLException { return (member) GetDB().queryForObject("getMemberInfo", member_id); } 중간쯤 보면 getMembe..

forEach , request.setAttribute

${article.title2} 1권 ${article.price}원 ${fn:substring(article.user_id, 0, fn:indexOf(article.user_id,"@")-2)}** 을 쓰려면 request.setAttribute 값을 어떻게 넘겨줘야하할까... http://stackoverflow.com/questions/13229448/jsp-jsti-foreach-array-from-request-setattribute http://ssp1154.tistory.com/entry/Core-%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC-cforEach%EB%B0%B0%EC%97%B4-%EC%B6%9C%EB%A0%A5 http://blog.naver...

반응형