`
keating
  • 浏览: 167155 次
  • 性别: Icon_minigender_1
  • 来自: weihai
社区版块
存档分类
最新评论
文章列表
Creating a Buffered Image from an Image http://www.exampledepot.com/egs/java.awt.image/Image2Buf.html An Image object cannot be converted to a BufferedImage object. The closest equivalent is to create a buffered image and then draw the image on the buffered image. This example defines a method tha ...
我是一个应届生,明年毕业(现已毕业,已老,安享晚年)。
百度百科搜来的简介,谷歌翻译成英文,改一下语法错误。由于英语水平所限,及时间问题,所以还会有一些错误之处。(作为计算机英语课演讲稿) 以下为正文: About Ruby: Ruby is a quick and easy object-oriented (OOP) scripting language. I ...
class Top { public Top(){ System.out.print("B"); } }; public class Bottom2 extends Top { public Bottom2(String s){ System.out.print("D"); } public static void main(String[] args){ new Bottom2("C"); System.out.println(" "); } ...
原文网址  http://hi.baidu.com/newsonglin/blog/item/de32f7f2d0a0e010b17ec542.html 咱还是闲话少说,直接切入正题。 起因: 一直用Tomcat,但是前几天突然报错:           java.net.BindException: Address already in use: JVM_Bind:80 第一反应就是80端口被占用了。更改IIS端口,不工作! 停掉IIS,不工作! 停掉IIS Admin还是不工作! 见了鬼了,去网上搜一把,都说是IIS或者迅雷的问题。也有说是IE的问题(也不能说他错,不过真TMD能扯淡)。我 ...
class PriorityQueue{ private Comparable[] array; private int index; public PriorityQueue(){ array=new Comparable[16]; index=0; } public boolean isEmpty(){ return index==0; } public void add(Comparable item){ if(index==array.length){ resize(); ...
public class Tree{ Object cargo; Tree left,right; public Tree(Object cargo,Tree left,Tree right){ this.cargo=cargo; this.left=left; this.right=right; } public static void main(String args[]){ Tree left=new Tree(new Integer(2),null,null); Tree right=new Tree(new Integer( ...
//循环缓冲区 public class Queue{ public Object[] array; public int first,next; public static void main(String args[]){ Queue qu=new Queue(); /* qu.first=0; qu.next=5; */ qu.first=2; qu.next=1; int a=5; qu.add(a); String b="abc"; qu.add( ...
class Complex{    //instance variables    double real,imag;    public static void main(String args[]){       Complex a=new Complex(1.0,1.1);       Complex b=new Complex(1.0,1.1);       boolean c=a.equals(b);       System.out.println(c);    }    //constructor    public Complex(){       this.real ...
1.作用域public,private,protected以及不写的区别? 2.说一说servlet的生命周期 3.JAVA SERVLET API中forward()与redirect()的区别? 4.Class.forName的作用?为什么要用? 5.xml有哪些解析技术?区别是什么? 6.谈一谈对stuts的理解和如何使用。解释一下mvc模式。 7.谈一谈JAVA中的reflect,以及在哪方面使用。 8.谈谈对Spring的理解,Spring完成什么工作,提供什么功能。 9.谈谈对orm的理解。如果在项目中用过Hibernate,如何解决延迟加载以及如何解决对象多对一映射时增加和删除记录 ...
为什么要用HashSet呢,因为要防止重复!为什么使用TreeSet呢,因为HashSet不可以排序! 在list的基础上,添加如下代码: HashSet<Song> songSet=new HashSet<Song>(); //如果使用TreeSet,则为: //TreeSet<Song> songSet=new TreeSet<Song>(); songSet.addAll(songList); System.out.println(songSet); 如果想把两个不同的Song对象视为相等的,就必须覆盖过从Object继承下来的has ...
import java.util.*; import java.io.*; public class Jukebox5{ ArrayList<Song> songList=new ArrayList<Song>(); public static void main(String[] args){ new Jukebox5().go(); } class ArtistCompare implements Comparator<Song> { public int compare(Song one,Son ...
通过property="*"方式,将内容设置到Bean中,原因是使用java的反射机制,根据参数名称找到相应方法。如,name,自动找到setName方法。 原则:让参数名称与Bean中的属性一致。 <jsp:setProperty name="sb" property="*"/>:自动匹配 <jsp:setProperty name="sb" property="name"/>:可以根据自己的需要设置需要的属性值 <jsp:setProperty name=&qu ...
Jukebox1.java import java.util.*; import java.io.*; public class Jukebox1{ //ArrayList<String> songList=new ArrayList<String>(); //歌曲名称会存在String的ArrayList上 ArrayList<Song> songList=new ArrayList<Song>(); public static void main(String[] args){ new Jukebox1 ...
javabean就是一个java类,也就意味着,java的一切特性,此处都可以使用,此javabean没有图形显示代码,只是完成基本业务逻辑。 javabean可以使用java的封装、继承、多态 使用javabean封装许多可重复调用的代码 --> 的开发过程是通过项目不断积累经验 结论:不会javabean的开发人员不能成为j2ee开发人员。 使用javabean达到现实与业务的分离 显示:JSP  业务:JavaBean java开发人员专注于具体业务的开发,jsp开发人员专注于显示效果的开发 将JavaBean编译好的*.class文件拷贝到WEB-INF/classes文件 ...
Global site tag (gtag.js) - Google Analytics