一维数组的使用

import java.util.Scanner;class ArrayDemo{ public static void main(String args[]){ sortArray(); }/** *一维数组的使用 */public static void sortArray() throws Exception{ Scanner in = new Scanner(System.in); System.out.println("Input one number"); int length =...
2011-12-13 09:57 | 阅读 1417 次 | 评论 0 条

jdbc连接数据库

class JDBCConn{private static Connection con;private PreparedStatement pstm;private ResultSet rs;/***1.加载驱动程序*2.获得连接*/ private JDBCConn(){ try{ Class.forName(String url); System.out.println("加载驱动程序成功"); con= DriverManager.getConnection(String driverName,String userName...
2011-12-10 10:26 | 阅读 1408 次 | 评论 0 条

ArrayTest

import java.util.ArrayList; import java.util.Scanner; import java.text.SimpleDateFormat; class ArrayTest{ public static void main(String args[]){ System.out.println("Input one number\b"); Scanner in = new Scanner(System.in); System.out.println("Input one number\...
2011-12-05 12:06 | 阅读 1459 次 | 评论 0 条

cookie

Response.addCookie(new Cookie(www.hnuotong.com,"jfei")); request.getCookies(i).getName(); //for循环设置欲登陆功能
2011-09-16 16:49 | 阅读 795 次 | 评论 0 条

PingDate

Class PingDate{ public void ping(){ System.out.println("welcome to use www.hnguotong.com"); Date d = new Date(); SimpleDateForamt sf = new SimpleDateForamt("yyyy-MM-dd"); System.out.println("Time is"+sf.format(d)); ...
2011-09-14 16:10 | 阅读 814 次 | 评论 0 条

applicationContext

<bean id="date" class="com/hnguotong/www" scope="protope"> <property name="jfei" value=""/> <set> <property name="value" value="value1"/> </set> </bean>
2011-09-14 16:07 | 阅读 961 次 | 评论 0 条

DataArray

class DataArray{ public static void main(String args[]){ String date ="jfei"; System.out.println(date); String arg [] = new String[5]; arg[0]="郑州国通交通设施有限公司"; arg[1]="郑州标牌厂家"; arg[2]="郑州路牌厂家"; ...
2011-09-09 16:40 | 阅读 1111 次 | 评论 0 条

StringDemo

import java.swing.*; import java.awt.*; class StringDemo extends JFrame{ String key1 ="郑州标牌厂家"; String key2 ="郑州路牌厂家"; String key3 ="郑州停车场设施"; String key4 ="国通标牌"; String key5 ="郑州国通交通设施有限公司"; Label l1,l2,l3,l4,l5; ...
2011-09-08 15:14 | 阅读 1131 次 | 评论 0 条

Servlet

import javax.servlet.http.*; class LoginServlet extends HttpServlet{ public void init(){ System.out.println("instance of the initalize"); } public void service(ServletConfig servletConfig)throws ServletException{ public void doGet(...
2011-09-08 15:02 | 阅读 1131 次 | 评论 0 条

KingDemo

class kingDemo{ public static void main(String args[]){ System.out.println("Input one Character\n"); String s ="jfei"; System.out.println(s.length()); System.out.println(s.charAt(23)); System.out.println(); System.out.println(s.s...
2011-09-07 15:29 | 阅读 1121 次 | 评论 0 条

Custructor

class Car{ String color; float length; long id; public Car(){ } public Car(String color,float length,long id){ this.color= color; this.length =length; this.id =id; } public String toString(){ reutrn color+length+id; } }
2011-09-02 18:10 | 阅读 1423 次 | 评论 0 条

Date

//以下代码有没有错误 class DateDemo{ public static void main(String args[]){ Date d =new Date(); SimpleDateFormat sf =new SimpleDateFormat("yyyy-MM-dd"); System.out.println("Time is"+sf.format(d)); System.out.println(); ...
2011-09-02 18:07 | 阅读 940 次 | 评论 0 条

String

class StringTest{ public static void main(String args[]){ System.out.println("Input one String\n"); String s ="jfei"; System.out.println(s.length()); System.out.println(s.charAt(1)); System.out.println(s.substring(2,2)); System.ou...
2011-09-02 18:04 | 阅读 1040 次 | 评论 0 条

System

public class SysTem{ public static void main(String args[]){ System.out.println("Hello,world"); } } //Hello,world Java SE
2011-08-27 16:45 | 阅读 943 次 | 评论 0 条
浏览59256次
最新评论