摘要: import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import com.hibernate.pojo.Student;public class StudentTest{ public static void main(String[] args) { Student s = new Student(); s.setAge(18); s.setName("song"); ... 阅读全文
posted @ 2012-08-13 20:53 苏堤白堤杨公堤 阅读(578) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()) { int a = in.nextInt(); int b = in.nextInt(); System.out.println(a+b); } }} 阅读全文
posted @ 2012-08-13 20:51 苏堤白堤杨公堤 阅读(919) 评论(0) 推荐(0) 编辑
摘要: import java.net.HttpURLConnection;import java.net.URL;import java.io.IOException;import java.io.InputStream;import java.io.BufferedReader;import java.io.InputStreamReader;public class httpGet{ private URL url; private HttpURLConnection httpURLConn; public void myDoGet() { try ... 阅读全文
posted @ 2012-08-13 20:50 苏堤白堤杨公堤 阅读(8107) 评论(0) 推荐(0) 编辑
摘要: import java.sql.*;public class mysql{ public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/test"; String userName = "root"; String passwd = "root"; C... 阅读全文
posted @ 2012-08-13 20:41 苏堤白堤杨公堤 阅读(236) 评论(0) 推荐(0) 编辑