工作中常用的J2EE技术

上一篇 / 下一篇  2008-05-04 20:18:13

  我是一名J2EE程序员,自己觉得对J2EE比较有经验:-)

  我觉得要学习J2EE, 能找到一份好工作,掌握以下的技术要点是必须的:

  (1)JavaBasic syntax

  (2) Memory manage inJava: 知道如何申请空间和释放空间

  (3) JDBC: 知道如何访问数据库

  (4) JSP: JSP在工作中最常用

  (5) Servlet: JSP执行前是被翻译成Servlet,所以基本Servlet知识也是必须的

  学习知识是为了工作,学习的最后方式也是在工作中学习,但是如何你不会,人家又会不雇用你,这是一个矛盾。

  所以,我们必须自我学习上面的基本知识,以通过面试。

  自我学习最好是找一本最简单的书,根据例子从粗到细耐心的学。

  大家希望找些关于Java内存管理的资料,我想在绝大部分Java书籍中都会有简单介绍,但都可能不够深入。我个人觉得了解Java内存管理特别重要。所以我在这里作介绍一些点,我是从一个DevPartner Java? Edition培训上学来的(那个培训对我影响深刻),希望对大家有用。

  New Memory Problems in Java

  1. Temporary Objects

    

 The GC works harder when objects are constantly being allocated,
usedforashorttime and then unreferenced
  For each
object
creation the following occurs:
  
*Memoryis
allocated on the heap
  
*
Class constructors are called
  
*
Fields are initialized
  
*The state of theobjectis
tracked
  Creating many
short-lived objectsis
a common performance bottleneck on the Java platform
  Temporary Objects
  
*
Medium and Short lived objects
  
*Survive less than2
garbage collections
  String concatenation example…
  String objects are immutable
  Once created, cannot be changed
  String abc
=“a”+b+
“c”;
  Translates to –
  String abc
=new
Stringbuffer().append(“a”)
  .append
  .append(“c”)
  .toString();
  Two
new
objects are created
  one StringBuffer and one String
  String result
=
“”;
  For (
inti=0; i<20; i++
) {
  result
+=
getNextString();
  }
  Better coded
as
:
  String result
=
“”;
  StringBuffer buffer
=new
StringBuffer();
  For (
inti=0; i<20; i++
) {
  buffer.append(getNextString())
  }
  Result
=buffer.toString();

    
       2. Java Memory Leaks

  3. Memory Footprint

  具体资料,大家可以查询www.compuware.com

  我的理解是这个Java工具软件公司为了提供给Java开发者好的工具,所以对Java内存管理的日常问题和我们编程中常犯的内存错误进行研究,希望大家喜欢。

 


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-07-06  
  12345
6789101112
13141516171819
20212223242526
2728293031  

数据统计

  • 访问量: 1911
  • 日志数: 14
  • 建立时间: 2008-03-20
  • 更新时间: 2008-05-22

RSS订阅

Open Toolbar