- 论坛徽章:
- 0
|
我是一名
J2EE
程序员
,自己觉得对J2EE比较有经验:-)
我觉得要学习J2EE, 能找到一份好工作,掌握以下的技术要点是必须的:
(1)
Java
Basic syntax
(2) Memory manage in
Java
: 知道如何申请空间和释放空间
(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 eachobjectcreation the following occurs:
*Memoryisallocated on the heap
*Class constructors are called
*Fields are initialized
*The state of theobjectistracked
Creating manyshort-lived objectsisa common performance bottleneck on the Java platform
Temporary Objects
*Medium and Short lived objects
*Survive less than2garbage collections
String concatenation example…
String objects are immutable
Once created, cannot be changed
String abc=“a”+b+“c”;
Translates to –
String abc=newStringbuffer().append(“a”)
.append
.append(“c”)
.toString();
Twonewobjects are created
one StringBuffer and one String
String result=“”;
For (inti=0; i20; i++) {
result+=getNextString();
}
Better codedas:
String result=“”;
StringBuffer buffer=newStringBuffer();
For (inti=0; i20; i++) {
buffer.append(getNextString())
}
Result=buffer.toString();
2. Java Memory Leaks
3. Memory Footprint
具体资料,大家可以查询
www.compuware.com
我的理解是这个Java工具
软件
公司为了提供给Java开发者好的工具,所以对Java内存管理的日常问题和我们编程中常犯的内存错误进行研究,希望大家喜欢。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78768/showart_1226760.html |
|