摘要: public class MySort{ public static void main(String[] args){ int score[] = {67, 69, 75, 87, 89, 90, 99, 100}; System.out.print("排序前结果:"); for(int a = 0; a < score.length; a++){ System.out.print(score[a]+" " ); } for (int i = 0; i < score.length... 阅读全文
posted @ 2013-08-12 15:55 elite_2012 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 出现这种情况一般是没有在web.xml里设置过滤器 阅读全文
posted @ 2013-08-03 08:50 elite_2012 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 一、获取客户端信息1.建立一个动态web (Dynamic Web project)ServletTest的项目2 在工程.ServletTest中创建一个BookInformationServlet.java的Servlet。package com;import java.io.IOExcepti... 阅读全文
posted @ 2013-07-23 14:13 elite_2012 阅读(269) 评论(0) 推荐(0) 编辑
摘要: public class ArrayOfArraysDemo1 { public static void main(String[] args) { int[][] aMatrix = new int[4][]; //populate matrix for (int i = 0; i < aMatrix.length; i++) { ... 阅读全文
posted @ 2013-07-18 15:11 elite_2012 阅读(391) 评论(0) 推荐(0) 编辑
摘要: public class ArrayOfStringsDemo { public static void main(String[] args) { String[] anArray = { "String One", "String Two", "String Three" }; for (int i = 0; i < anArray.leng... 阅读全文
posted @ 2013-07-18 15:09 elite_2012 阅读(486) 评论(0) 推荐(0) 编辑
摘要: public class ContinueWithLabelDemo { public static void main(String[] args) { String searchMe = "Look for a substring in me"; String substring = "sub"; boolean foun... 阅读全文
posted @ 2013-07-18 15:08 elite_2012 阅读(187) 评论(0) 推荐(0) 编辑
摘要: public class BreakDemo { public static void main(String[] args) { int[] arrayOfInts = { 32, 87, 3, 589, 12, 1076, 2000, 8, 622, 127 }; int sea... 阅读全文
posted @ 2013-07-18 15:05 elite_2012 阅读(467) 评论(0) 推荐(0) 编辑
摘要: public class WhileDemo { public static void main(String[] args) { String copyFromMe = "Copy this string until you encounter the letter 'g'."; StringBuffer copyToMe = new Strin... 阅读全文
posted @ 2013-07-18 15:03 elite_2012 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 6.1 Servlet简介: Servlet 是用java 编写的运行在服务器端上的小程序。servlet 本身不能直接独立运行,只能运行于支持servlet的服务器上。servlet用于接收来自客户的请求,并将处理结 果以动态网页的形式返回到客户端浏览器。jsp文件的执行,首先必须由java虚拟机编译转换为servl... 阅读全文
posted @ 2013-06-26 08:42 elite_2012 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 14.1 软件组件模型 软件组件是分离的、可重用的软件部分,可以方便的将其装配以创建各种应用程序,提高了开发效率 JavaBeans技术是一种跨体系结构和平台的API,用于创建动态Java软件组件 软件组件大致可以分为两类: ... 阅读全文
posted @ 2013-06-23 10:44 elite_2012 阅读(218) 评论(0) 推荐(0) 编辑