Chinaunix首页 | 论坛 | 博客
  • 博客访问: 340196
  • 博文数量: 1051
  • 博客积分: 53280
  • 博客等级: 大将
  • 技术积分: 6670
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-09 13:21
文章分类

全部博文(1051)

文章存档

2011年(1)

2008年(1050)

我的朋友

分类:

2008-09-09 16:33:45

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

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

  (1)Basic syntax

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

  (3) JDBC: 知道如何访问

  (4) : 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

  具体资料,大家可以查询

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

 



--------------------next---------------------

阅读(88) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~