首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

初学java,碰到简单面试题:(,该怎么处理

2012-02-01 
初学java,碰到简单面试题:(howtoanswerfollowingquestionsinenglish:1.Howtolockthreadresourcesinjava?2.

初学java,碰到简单面试题:(
how   to   answer   following   questions   in   english:

1.How   to   lock   thread   resources   in   java?

2.please   give   a   example   of   MVC   implementation?

[解决办法]
1.synchronized(this)
2.Struts WebWork Spring
[解决办法]
1.synchronized
2.struts MVC
[解决办法]
synchronized(this);
wait();

Struts Spring WebWork
[解决办法]
题1:
The Java programming language does not provide a way to perform separate lock and unlock actions; instead, they are implicitly performed by high-level constructs that arrange always to pair such actions correctly.
however, that the Java virtual machine provides separate monitorenter and monitorexit instructions that implement the lock and unlock actions.
题2:
Spring、Struts、Eclipse are all the implementations of the MVC pattern.

热点排行