본문 바로가기

전체 글

(97)
파일 다운로드
자바 int -> string format https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=seban21&logNo=70120449404
GSON https://web-inf.tistory.com/64 JAVA JSON 라이브러리 구글 GSON 알아보자(Google Gson) 오랜만에 자바 포스팅하나를 작성하러 돌아왔습니다. 이번에 소개드릴것은 구글의 GSON 입니다. GSON은 자바 라이브러리중 하나인데, 자바 오브젝트를 쉽게 JSON으로 변환시켜주는 아주 간단하고 web-inf.tistory.com jetty with json https://noritersand.github.io/servlet/servlet-json-%EB%AC%B8%EC%9E%90%EC%97%B4%EB%A1%9C-%EC%9D%91%EB%8B%B5%ED%95%98%EA%B8%B0/ [Servlet] JSON 문자열로 응답하기 띠용 noritersand.github.io SslC..
Thread 변수 공유 package com.ygygood.sample_code; import java.util.ArrayList; import java.util.List; public class ThreadTest { static public List arrList; public ThreadTest() { arrList = new ArrayList(); } public void start() { Runnable putWorker = new PutWorker(); Runnable getWorker = new GetWorker(); Thread pThread = new Thread(putWorker); Thread gThread = new Thread(getWorker); pThread.start(); gThread.start(..
Java 현재 날짜 및 조작 public class DateController { Calendar calendar = null; public DateController() { calendar = Calendar.getInstance(); } public Date getToday() { return calendar.getTime(); } public Date getMonthAgo(int month) { calendar.add(Calendar.MONTH, -month); return calendar.getTime(); } public static void main(String[] args) { DateController dc = new DateController(); System.out.println(new SimpleDateForma..
thead new Thread(() -> { for (int i = 0; i < 1000; i++) { temp.callMe("Thread1"); } }).start();
jetty server public class MyServer{ public static void main(String[] args){ new MyServer().start(); } public void start() throws Exception{ Server server = new Server(); ServerConnector http = new ServerConnector(server); http.setHost("217.0.0.1"); http.setPort(8080); server.addConnector(http); ServletHandler servletHandler = new ServletHandler(); servletHandler.addServletWithMapping(MyServlet.class, "/mypat..
2021년 1월 영어노트 1.유리하다/불리하다 is advantageous/disadvantageous to ex) The new policy is only advantageous to parents with two or more children. ex) The new policy is disadvantageous to parents with no children. ex) The new policy is only advantageous for parents with two or more children to buy a house. is in a better position ex) Based on the new policy, parents with two or more children are in a much better posi..