본문 바로가기

백엔드기술106

ConstructorEx package java_samples_hwang; /** * Constructor example program * @author hwang */ public class ConstructorEx { int empId; String empName; public ConstructorEx(int empId, String empName) { this.empId = empId; this.empName = empName; } public void printData() { System.out.println("EmpID :"+empId); System.out.println("EmpName:"+empName); } } class prog { public static void main(String args[]) { Cons.. 2009. 12. 9.
InheritanceDemo package java_samples_hwang; /** * * @author hwang */ class Base { int id; String sName; public void setData(int Id,String Name) { id = Id; sName = Name; } } class student extends Base { String sInstitution; public void setInstitute(String s) { sInstitution = s; } public void printData() { System.out.println("The Student Details are....."); System.out.println("Student ID: "+ id); System.out.print.. 2009. 12. 9.
Connect sample package java_samples_hwang; import java.sql.*; /** * * @author hwang */ public class Connect { public static void main(String arg[]) { Connection con = null; Statement statement; try { String userName = "root"; String password = "root123"; String url = "jdbc:mysql://localhost:3306/Master"; Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection(url, userName, pass.. 2009. 12. 9.
ArrayDemo package java_samples_hwang; /** * * @author hwang */ public class ArrayDemo { public static void main(String args[]) { int[] anArray; // declares an array of integers anArray = new int[5]; // allocates memory for 10 integers anArray[0] = 100; // initialize first element anArray[1] = 200; // initialize second element anArray[2] = 300; // etc. anArray[3] = 400; anArray[4] = 500; System.out.println.. 2009. 12. 9.
Modularization Modularization Example (Study) Dear all, 안녕하세요 공유하고 함께 의논해볼만한 것을 준비했습니다. 다음의 문제를 해결하기 위한 3개의 코드가 첨부되어 있습니다. ==[문제]=============================================== ------------------------------------------------------------------------------------------------ 아래와 같은 Input 스트링이 있습니다. 꺽쇠 기호 사이의 문자열 중 스페이스 공간을 언더바( _ )로 바꾸고 양쪽 여백을 삭제하여 출력하세요. Input : " " Output : " " --------------------------------.. 2009. 12. 9.
VB.NET, C# and VC++ Comparison 1. Purpose The purpose of this document is to make initial recommendations based on a comparative analysis of VC++, VB.NET and C# for development of Blu Ray Disc authoring application. The document first talks about features of VC++, VB.NET and C#. Then it compares the pros and cons of each development environment with respect to various evaluation criteria. Recommendation follows in the later s.. 2009. 12. 9.