Language/JAVA (10) 썸네일형 리스트형 [Spring] Web Server vs WAS (Web Application Server) Web Server 개념HTTP 프로토콜을 이용해 정적인 웹 페이지를 보여주는 역할을 하는 서버클라이언트(웹브라우저)로부터 HTTP 요청을 받아들이고HTML, CSS, JAVASCRIPT, 이미지, 문서와 같은 웹페이지(웹 리소스)를 반환하는 컴퓨터 프로그램이때 웹 서버는 클라이언트(웹 브라우저)가 해당 리소스를 받아서 화면에 랜더링(표시)함HTTP 프로토콜 기반으로, 클라이언트의 요청을 서비스하는 기능 역할정적 컨텐츠 제공 : WAS를 거치지 않고 바로 자원 제공동적 컨텐츠 제공을 위한 요청 전달: 동적 컨텐츠 요청을 WAS로 넘겨주고, WAS에서 처리한 결과를 클라이언트에게 전달 기능Reverse Proxy서버와 클라이언트 사이에 프록시를 두고 프록시를 통해 데이터를 주고 받는다.보안의 이유로 서버 .. [Java] Wrapper Class Wrapper 클래스란?자바의 자료형은 크게 기본 타입(primitive type)과 참조 타입(reference type)으로 나누어진다. 기본 타입은 char, int, float, double, boolean 등이 있고 참조 타입은 class, interface 등이 있는데 프로그래밍을 하다 보면 기본 타입의 데이터를 객체로 표현해야 하는 경우가 종종 있다.자바의 Wrapper 클래스는 기본 자료형(Primitive Type)을 객체(Object)로 감싸는 클래스이다. 기본형 데이터를 객체로 다뤄야 할 때 사용되며, java.lang 패키지에 포함되어 있다. 기본 자료형(primitive type) - Wrapper 클래스byteByteshortShortintIntegerlongLongfloatF.. [JAVA] 입력 BufferedRead로 한 줄에 대해서 입력StringTokenizer st = new StringTokenizer(s);string.split( )과 유String을 token 단위로 나눠주는 클래스 package org.example;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.IOException;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(Syst.. [명품 JAVA programming] CHAPTER 4 클래스와 객체(실습문제) #1public class TV { String company; int year; int size; public TV(String company, int year, int size){ this.company = company; this.year = year; this.size = size; } public void show(){ System.out.println(company+"에서 만든 " + year + "년 " + size + "인치"); }}public class Ex4_1 { public static void main(String[] args) { TV myTV = new TV("LG", 2.. [명품 JAVA programming] CHAPTER 4 클래스와 객체 4.2 클래스 만들기클래스 구성클래스의 구성 요소 : 멤버멤버 = 필드(멤버 변수) + 메소드(멤버 함수) 예제 4-2너비와 높이를 입력받아 사각형의 합을 출력하는 프로그램을 작성하라public class Rectangle { int width; int heigth; public int Rectarea(){ return width*heigth; }}import java.util.*;public class example { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Rectangle rect = new Rectangle(); // 객체 생성 .. [명품 JAVA programming] CHAPTER 3 반복문과 배열 그리고 예외 처리(실습문제) #3Scanner를 이용하여 정수를 입력받고 다음과 같이 *을 출력하는 브로그램을 작성하라. 다음은 5를 입력받았을 경우이다.정수를 입력하시오>> 5***************import java.util.*;public class Ex3_3 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print("정수를 입력하시오>>"); int n = scan.nextInt(); for(int i=n;i>0;i--){ // int(i=0;i for(int j=0;ji;j++){ System.out.. [명품 JAVA programming] CHAPTER 3 반복문과 배열 그리고 예외 처리 3.1 반복문for 문while 문do-while 문 반복 횟수를 처음부터 알 수 있는 경우 : for 문반복 횟수를 알 수 없고 조건에 따라 반복이 계속되거나 중단되는 경우 : while 문, do-while 문 반복 조건을 처음부터 따지는 경우 : while 문반복 조건을 나중에 따지는 경우: do-while * while 문 주의사항조건식에 사용되는 변수를 while문 실행 전에 초기화해야 한다int i = 0; while(i10){ System.out.println(i); i++; } 예제 3-2-1이 입력될 때까지 입력된 수의 평균 구하기import java.util.*;public class ex { public static void ma.. [명품 JAVA programming] CHAPTER 2 자바 기본 프로그래밍(실습문제) #1// 1$ = 1100원import java.util.*;public class Ex2_1 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print("원화를 입력하세요(단워 원) >> "); float won = scan.nextInt(); float dollar = won/1100; System.out.print(won+"은 "+"$"+dollar+"입니다."); scan.close(); }} #2import java.util.*;public class Ex2_2 { public static.. 이전 1 2 다음