Tech/SpringBoot
-
비트를 이용한 플래그 사용법Tech/SpringBoot 2015. 2. 2. 14:14
public class FlagExam { public static final int SNMP = 0x00000001; public static final int TELNET = 0x00000002; public static final int SSH = 0x00000004; static int protocol = 0x0000000; // 변수 초기화 public static void main(String[] args) { protocol = SNMP | SSH | TELNET; //0000 0001 //0000 0010 //0000 0100 // OR //0000 0111 if((protocol & SNMP)!=0x0000000){ //0000 0111 //0000 0001 // AND //0000 00..
-
자바 데이터 베이스 연동 클래스 설계Tech/SpringBoot 2014. 11. 7. 11:24
데이터 베이스 연동 클래스 package com.databaseaccess; /** * @author Dream */ import java.sql.ResultSet; public interface IDBAccess { public void openConnection(); public void closeConnection(); public boolean sendQuery(String sql); public ResultSet selectQuery(String sql); } package com.databaseaccess; /** * @author Dream */ import java.sql.Connection; import java.sql.DriverManager; import java.sql.Prepare..
-
-
자바 비트 스왑Tech/SpringBoot 2014. 10. 20. 22:45
package com.wooriworld2006.javastudy; /** * * @author Dream * 비트 연산으로 스왑 하자 */ public class BitOper { public static void main(String[] args) { int a = 10; int b = 30; System.out.println("a = "+a+" b = "+b); a ^=b; b ^=a; a ^=b; System.out.println("a = "+a+" b = "+b); } }
-
자바 (continue label,향상된 for,variable arguments) 사용법Tech/SpringBoot 2014. 10. 18. 22:07
package com.wooriworld2006.javastudy; /** * * @author Dream * 향상된 for 문 학습 * continue label 문 학습 * varargs(Variable Arguments) * 메소드 정의 시 통일된 인자의 자료형에 '...'라고 명시함으로써 이를 통해 * 메소드를 수행하는데 필요한 인자의 수를 유연하게 구현 할 수 있다. * (내부적으로 배열화 작업을 자동적으로 해준다.) */ public class NewExam { public static void argTest(String ...n){ System.out.println("====Variable Arguments 사용법===="); for (int i = 0; i < n.length; i++) {..
-
채팅프로그램(방채팅_GUI)Tech/SpringBoot 2013. 2. 20. 02:24
package com.wooriclient;--* * 채팅방 GUI --import java.awt.BorderLayout;import java.awt.EventQueue;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.border.EmptyBorder;import javax.swing.border.BevelBorder;import java.awt.TextField;import java.awt.Font;import java.awt.TextArea;import javax.swing.JTextPane;import javax.swing.JButton;import javax.swing.JList;public class wooriCha..
-
채팅프로그램(채팅 방 GUI)Tech/SpringBoot 2013. 2. 20. 02:23
package com.wooriclient;--* * 채팅 방GUI --import java.awt.BorderLayout;import java.awt.EventQueue;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.border.EmptyBorder;import javax.swing.JScrollPane;import javax.swing.JTextPane;import java.awt.TextField;import javax.swing.JButton;public class woorichat extends JFrame {private JPanel contentPane;--* * Launch the application. --p..
-
채팅프로그램(로그인시친구목록_GUI)Tech/SpringBoot 2013. 2. 20. 02:23
package com.wooriclient;--* * 유저가 접속시 친구목록 보여주는 GUI * 목록은 리스트로 구성함 * 친구를 클릭한후 채팅,채팅방버튼 클릭시 챝팅방입장 --import java.awt.BorderLayout;import java.awt.EventQueue;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.border.EmptyBorder;import javax.swing.JTextField;import java.awt.Font;import javax.swing.JScrollPane;import javax.swing.JList;import javax.swing.border.BevelBorder;import j..
-
채팅프로그램(로그인 GUI 부분)Tech/SpringBoot 2013. 2. 20. 02:22
package com.wooriclient;--* * 로그인 GUI 부분 * --import java.awt.BorderLayout;import java.awt.EventQueue;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.border.EmptyBorder;import javax.swing.JTextField;import javax.swing.JPasswordField;import javax.swing.JRadioButton;import javax.swing.JButton;import javax.swing.JProgressBar;import javax.swing.JEditorPane;public class woorilog..
-
채팅프로그램(회원가입_GUI부분)Tech/SpringBoot 2013. 2. 20. 02:20
package com.wooriclient;--* * 회원가입 GUI부분 * --import java.awt.BorderLayout;import java.awt.EventQueue;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.border.EmptyBorder;import javax.swing.JTextField;import java.awt.Font;import javax.swing.border.BevelBorder;import javax.swing.JButton;import javax.swing.JRadioButton;import javax.swing.ButtonGroup;public class woorijoin exten..