Bubble,Exchange,Selection,Insertion,Shell Sort Implementation package sort; import java.util.Arrays; public class ManySort { // bubble sortpublic static void bubbleSort(Integer[] S) {int n = S.length;int temp; for (int i = 0; i < n; i++) {boolean exchanged = false;for (int j = 1; j
프로젝트 명 : 자바(소켓통신)기반으로한 멀티 채팅 프로그램 개발프로젝트 기간 : 2주 프로그램 기능 : 대기실, 채팅방 구현, 귓속말, 닉네임바꾸기, 채팅방들어가기, 나가기, 로그아웃, 회원가입, 유저리스트, 방 리스트 표현 주요화면 소개 1. 서버화면 - 메시지를 표시해준다. 2. 서버 아이피 주소 입력화면 3. 로그인화면, 회원가입도 가능하다. 4. 로그인 성공 시 띄워지는 대기실 화면 5. 채팅방 접속화면 6. 대기실에서 메뉴버튼을 눌러 닉네임을 변경할 수 있다.
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException; public class PreparedStmt {/** * PreparedStatement 테스트 */Connection con; static {try {Class.forName("oracle.jdbc.driver.OracleDriver");} catch (ClassNotFoundException cne) {cne.printStackTrace();}} public void connect() {try {con = DriverManager.getCo..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; public class UDPClient { public static void main(String[] args) { // TODO Auto-generated method stub BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); System.out.println("보낼 자료 입력 : "); St..
import java.io.IOException;import java.io.PrintWriter;import java.net.InetAddress;import java.net.Socket; public class TCPClient { public static void main(String[] args) {// TODO Auto-generated method stub InetAddress ia = null;Socket socket = null;PrintWriter out = null;try {ia = InetAddress.getByName("127.0.0.1");socket = new Socket(ia, 5555);out = new PrintWriter(socket.getOutputStream(), tru..
import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.IOException;import java.io.InputStreamReader;import java.io.OutputStreamWriter;import java.io.PrintWriter;import java.net.InetAddress;import java.net.Socket; public class WebSocket { public static void main(String[] args) {// TODO Auto-generated method stub InetAddress ia = null; // 주소 참조 변수Socket sock = null; // 소켓 참조변수P..