高手请进,j2ee面试题目(难一个字!!!!!),本人考不定,请那位高手帮忙,谢谢

suiyuan0808 2007-07-12 07:18:43
1.写出两种单例模式; (难度简单)
2.使用javascript来检验移动电话号码前面三位必须为134-139.另外前面的4位不能为1349XXXXXXX;
3.表A有岁三个字段a,b,c,他们类型都为varchar2类型并且允许为空,查处表A所有记录(要求为空的值为0);
4.jsp九大内置对象以及其作用; (难度简单)
5.使用javascript来检验输入数据是否为数字类型;
6.写一个存储过程调用游标的sql;
7.使用java实现冒泡排序; (难度简单)
8.表T(Sid,Sco,Score)表示学生学号,课程名称以及分数,查询每门课程的平均分并降序排列.如果平均相等则按学号升序排列;
9.在文本框中输入表示时间段数据,使用javascript来检验输入数据是否为日期类型;平且开始时间不小于结束时间,各个时间段不能重复.如输入:08:32:02-14:25:00,15:00:00-17:00:00
10.oracle 表A有字段type varchar2(1),num number(4),若字段type值为1则num字段的值为负数;如果字段type值为2则num字段的值为零0;字段type值为3则num字段的值为正数.求A中的num 值(请使用一个sql中完成,type字段的三个状态读要考虑到);
12.使用struts完成一个对产品product实现查询增加,详细分析并写出主要累代码;
13.请写出下面代码 起什么作用:
var a=document.all("aaa");
var a1=a.insertRow(a.rows.length);
var c=a1.insertCell();
c.innerHtml="<input name='kkk' length='3' >";
var c2=a1.insertCell();
c2.innerHtml="<input name='kkk2' length='3' >";[
...全文
3545 69 打赏 收藏 转发到动态 举报
写回复
用AI写文章
69 条回复
切换为时间正序
请发表友善的回复…
发表回复
banditgao 2008-03-17
  • 打赏
  • 举报
回复
呵呵 程序员都不喜欢纸上做题 但是没办法 基本都要笔试啊 这些算什么 最恶心的是智力测试题
rayson0405 2008-03-17
  • 打赏
  • 举报
回复
有点意思.. 做了做. 感觉还不错..
zryhy 2008-03-17
  • 打赏
  • 举报
回复
mark
nihuajie05 2008-03-17
  • 打赏
  • 举报
回复
谁让你去面的是J2EE,你去面J2SE嘛...
yami251139 2008-03-17
  • 打赏
  • 举报
回复
給我api我應該能做的出來。。。
手寫?讓他見鬼去吧!!
tianyidan 2008-03-17
  • 打赏
  • 举报
回复
有写东西还是要了解一下的。
istimeto 2008-03-17
  • 打赏
  • 举报
回复
3. 写出程序的输出结果:(10分)
class Base
{
int a = getInit( "init a ");

static int a = getInit( "init a ");

static int getInit(String str)
{
System.out.println(str);
rerurn 6;
}

pablic Base()
{
getInit( "init Base ");
}
}

public class A extends Base
{
public static void main(String[] agr)
{
int x = getInit( "init x ");
static int y= getInit( "init y ");
}
public A()
{
getInit( "init A ");
}
}
结果:init a ...x ...y

4. Vector v= new Vector(5,10),当v中增加到第六个数据后,v.size()等于多少?
5+10=15
istimeto 2008-03-17
  • 打赏
  • 举报
回复
2.判断题:(10分)

class Parent
{
public void m1(int a){}
public static void m2(int a){}
public void m3(int a){}
public static void m4(int a){}
}

public class Child extends Parent
{
public void m1(int a){}
public static void m2(int a){}
public static void m3(int a){}
public void m4(int a){}
}
上面父类与子类之间四个方法m1,m2,m3,m4中,哪些函数是实现了子类的函数重写了父类的函数,而哪些函数是实现了子类的函数隐藏了父类的函数?
这个编译应该通不过,m1(int a)和m2(int a)被重写了,
istimeto 2008-03-17
  • 打赏
  • 举报
回复
这个用的线程只是象征性的示例一下,没有循环流动了。。。
istimeto 2008-03-17
  • 打赏
  • 举报
回复
来试试看
1.编写题目:(20分)
自己实现一个队列,在队列中实现出队与入队等队列的基本操作。利用两个线程来实现,一个线程实现
对该队列入列,另一个队列实现出列并打印。提示队列中只能插入10个整形数据(应该需要注意同步

import java.io.*;
public class queuetest
{
char []queue;
int lenghth;
int ptr;
int front;
public queuetest(int len)
{initial(len);}
public void initial(int len)
{
lenghth=len;
queue=new char[len];
ptr=0;//tial
front=0;
}
public void inque(char a)
{

synchronized(this){
queue[ptr]=a;
}
ptr=(ptr+1)%lenghth;
}
public char dequeue()
{
char mid;
if(ptr==front)
{
System.out.println("the queue is empty");
return ' ';
}
else synchronized(this)
{

mid=queue[front];
front=(front+1)%lenghth;
return mid;
}

}
class inq implements Runnable
{char b;
inq(char c)
{
b=c;
}
public void run()
{
inque(b);

}

}
class deq implements Runnable
{
char d;
public void run()
{
d=dequeue();
System.out.println(d);

}
}
public void go()
{

char a='a';

inq j=new inq(a);
deq l=new deq();
Thread thin=new Thread(j);
Thread thde=new Thread(l);
thin.start();
//try{thin.join();}catch(Exception e){}
thde.start();


}
public static void main(String args[])
{
int i=10;
queuetest k=new queuetest(i);
k.go();


}
}
istimeto 2008-03-17
  • 打赏
  • 举报
回复
典型的没有用科学发展观武装起来的。呵呵。。。漏洞很多啊!!!
Thread 线程在哪儿?、
队列的操作连个“%”都没看见。。。

[Quote=引用 18 楼 weickchen 的回复:]
实现队列:
class queue
{
private int getloc,putloc;
private int a[];
queue(int size)
{
getloc=putloc=0;
a=new int[size+1]; //数组的大小必须比想要的大1
}
void put(int i) //入列线程,由main()传递整形变元i存入队列
{
if(putloc==a.length-1)
{
System.o…
[/Quote]
lysh718 2008-03-17
  • 打赏
  • 举报
回复
学习中,有些不会,期待高手解答
tree006 2008-03-17
  • 打赏
  • 举报
回复
只会做几个
期待高手把所有问题干掉!!
cnjzy0106 2008-03-17
  • 打赏
  • 举报
回复
这些都手写??
不是上机啊!!!???
fuyou001 2008-03-17
  • 打赏
  • 举报
回复
mark
steven_srl 2008-03-17
  • 打赏
  • 举报
回复
留位子,以后慢慢做
Yin_teng_Fei 2008-03-16
  • 打赏
  • 举报
回复
都曾经会过 不能完全回大 能找到工作么?
deng1234 2008-03-16
  • 打赏
  • 举报
回复
一创中拓 真的不行了,老子06年的本科,他说试用期2500

weijiepeng 2008-03-16
  • 打赏
  • 举报
回复
8 insert into tb values(2,'物理',70)
insert into tb values(3,'物理',21)
insert into tb values(4,'物理',70)
insert into tb values(1,'化学',30)
insert into tb values(2,'化学',70)
insert into tb values(3,'化学',21)
insert into tb values(4,'化学',70)
go
select sid, avg(sco) as sco
from tb group by sid order by avg(sco) desc,sid
drop table tb
2 70
4 70
3 37
1 23

(所影响的行数为 4 行)
weijiepeng 2008-03-16
  • 打赏
  • 举报
回复
create table tb(a varchar(10) , b varchar(10),c varchar(10))   
insert into tb values('a' ,'cc','')
insert into tb values('','','ee')
insert into tb values('a2','dd','')
go
select a = case when a='' then '0'
else a
end,
b=case when b='' then '0'
else b
end,
c=case when c='' then '0'
else c
end
from tb
drop table tb

---------- ---------- ----------
a cc 0
0 0 ee
a2 dd 0


(所影响的行数为 3 行)
加载更多回复(49)

62,623

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧