목록JAVA (28)
develope_kkyu
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/U4VB8/btrUP99fLtK/JjSGmyvkm3lVzOqr1oTr8K/img.png)
jsp, mybatis 등을 활용하여 회원가입, 로그인 페이지 만들기 기능 회원가입시 비밀번호와 비밀번호 확인이 다를시 경고창 회원가입 페이지에 빈칸이 있을시 '입력하시오' 경고 회원가입 성공시 로그인 페이지로 넘어감 로그인시 아이디나 비밀번호가 db에 없으면 다시 로그인 로그인 성공시 홈페이지로 넘어가고 아이디와 로그아웃 링크 생성(session 사용) home.jsp - 홈 화면 Welcome Home Page login.jsp - 로그인 화면 Welcome Home Page signin.jsp - 회원가입 화면 로긴아이디 비밀번호 비밀번호확인 실명 모바일 홈으로로그인하기 MyController.java - 서버 package com.human.springboot; import java.util.Ar..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/cZQM7n/btrUfJqwVcW/JATYnRP7YE7k6Zbfjcg2mK/img.png)
역량 부족으로 실패했습니다. 따라하지 않으시는 것을 추천드립니다. AppMain.java import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class AppMain extends Application{ @Override public void start(Stage primaryStage) throws Exception { FXMLLoader loader = new FXMLLoader(getClass().getResource("root.fxml")); Parent root = ..
public static void main(String[] args) { // 1. 제네릭을 사용하지 않았을 경우의 케이스. ==> 데이터의 타입을 확인하면서 강제타입변환을 필요하였음. List list1 = new ArrayList(); // List는 인터페이스, ArrayList는 구현클래스. list1.add("HUMAN1"); list1.add("HUMAN2"); list1.add(10); // 위의 형태로 문자와 숫자가 같이 담겨있을 수 있는 이유는 // Object의 형태이기 때문에 가능함. String str1 = (String) list1.get(0); // list1.get(0) ==> 되돌려주는 값의 타입. Object // Object 클래스는 모든 클래스의 최상위 타입임. // S..
import java.time.DayOfWeek; import java.time.LocalDateTime; import java.time.temporal.TemporalAdjusters; public class DateTimeOperatinExam { public static void main(String[] args) { LocalDateTime now = LocalDateTime.now(); System.out.println("현재시간 : " + now.toString()); // 날짜, 시간의 연산 LocalDateTime targetDateTime1 = now.plusYears(1).minusMonths(2).plusDays(3).plusHours(4).minusMinutes(5).plusSeco..
import java.time.Duration; import java.time.LocalDateTime; import java.time.Period; import java.time.temporal.ChronoUnit; public class DateTimeCompareExam { public static void main(String[] args) { LocalDateTime startTime = LocalDateTime.of(2023, 1, 1, 9, 0, 0); LocalDateTime endTime = LocalDateTime.of(2024, 12, 31, 23, 59, 59); System.out.println("시작시간 : " + startTime); System.out.println("종료시간..
import java.util.Calendar; public class CalenderExam { public static void main(String[] args) { Calendar now = Calendar.getInstance(); //System.out.println (now); System.out.println (now.toString()); int year = now.get(Calendar.YEAR); // 2022 int month = now.get(Calendar.MONTH) + 1; // Calendar.MONTH는 0에서부터 시작 ==> 9 int day = now.get(Calendar.DAY_OF_MONTH); // 21 int week = now.get(Calendar.DAY_..
Accoung.java public class Account { private String ano; private String owner; private int balance; private int password; public Account(String ano, String owner, int balance, int password) { this.ano = ano; this.owner = owner; this.balance = balance; this.password = password; } public String getAno() { return ano;// this.ano } public void setAno(String ano) { this.ano = ano; } public String getO..
Account.java public class Account { private String ano; private String owner; private int balance; public Account(String ano, String owner, int balance) { this.ano = ano; this.owner = owner; this.balance = balance; } public String getAno() { return ano;// this.ano } public void setAno(String ano) { this.ano = ano; } public String getOwner() { return owner;// this.owner } public void setOwner(Str..
두 주사위 눈의 합이 5가 나올 때까지 실행 public static void main(String[] args) { for(int i = 0; i 5
public static void main(String[] args) { // for문은 활용하여 1~100까지의 누적합 구하기. int total = 0; int index;// for문 밖에서 index를 사용하는 부분이 있기 때문에 변수 선언은 for문 밖에서 사용. for (index=1; index 초기값을 설정 // index 반복에 대한 조건. // index++ ==> for문 마감시 처리하는 실행문 total = total + index; System.out.printf("%d번째까지의 누적합 %d입니다. \n", index, total); } System.out.printf("index = %d \t total=%d \n", index-1, total); } -- 1번째까지의 누적합 1..