- 博客(24)
- 资源 (7)
- 收藏
- 关注
翻译 Think in java笔记 final
Think in java笔记 final Many programming languages have a way to tell the compiler that a piece of data is “constant.” A constant is useful for two reasons: 1. It can be a compile-time constant
2016-06-27 16:58:25 266
翻译 think in java笔记 upcasting
Think in java笔记 upcastingupcast本身的意思是从子类向父类转型,然后就会失去了本身特有的属性及方法。但是当转型成功之后,调用的方法是父类还是子类?First, you must understand, that by casting you are not actually changing the object itself, you are just labeling
2016-06-27 14:13:20 407
转载 word怎么使用crtl+d删除一行
Macro-based shortcutOK, based on our comment discussion here’s a macro based solution.Create a new Macro with the following code (Alt+F8, specify the name, click Create):Selection.HomeKey Unit:=wdLine
2016-06-26 11:46:11 1637 4
翻译 Order of initialization
Order of initialization Within a class, the order of initialization is determined by the order that the variables are defined within the class. The variable definitions may be scattered throughout an
2016-06-23 10:14:23 421
翻译 think in java笔记:How a garbage collector works
think in java笔记:How a garbage collector works If you come from a programming language where allocating objects on the heap is expensive, you may naturally assume that Java’s scheme of allocating
2016-06-22 18:43:16 759
翻译 think in java笔记:this关键字
think in java笔记:this关键字 The this keyword—which can be used only inside a non-static method—produces the reference to the object that the method has been called for. You can treat the refere
2016-06-22 11:14:26 406
原创 think in java笔记:for each 循环
think in java笔记:for each 循环适用于: 1. array 2. iteratable object什么时候应该用: So when should you use the for-each loop? Any time you can. It really beautifies your code. Unfortunately, you cannot use it ev
2016-06-22 09:47:23 404
原创 Struts2配置拦截器的后缀名
Struts2配置拦截器的后缀名在web.xml中配置 <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping> 在struts.xml中配置<!-- 拦截后缀名 action,html --><constant name="st
2016-06-12 18:25:49 354
翻译 每个Java文件自动导入的library
每个Java文件自动导入的library At the beginning of each program file, you must place any necessary import statements to bring in extra classes you’ll need for the code in that file. Note that I say “ext
2016-06-12 14:38:14 727
原创 JSP和HTML的区别
JSP和HTML的区别 今天下载了一个测试页面test.jsp,发现直接用浏览器打开是不行的,所以就想到了它和HTML的区别,然后总结一下。从功能来说: HTML属于MARKUP类的语言,着重于表现。JSP着重于数据交互。从执行来说:HTML属于客户端浏览器的语言,JSP属于Server端的语言,必须要在server中编译成servlet才能够访问。安全性来说:HTML是客户端可见的,但是
2016-06-12 12:42:36 543
原创 如何使用JSTL
如何使用JSTL在工程内部引入jstl.jar和standard.jar在jsp页面或者web.xml引入标签。 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> 可能发生的问题:The absolute uri: http://java.sun.com/jstl/core cannot be resolved Q
2016-06-12 12:34:00 785
原创 JavaScript BOM的属性及方法
BOM - Browser Object ModelWindow对象 属性有以下内容 history 有关客户访问过的URL信息location 有关当前URL的信息,一般用于跳转网页 window.location=”http://www.sohu.com”screen 有关客户端的屏幕和现实性能的信息,只有个别特殊应用才能用到 常用方法: prompt: 提示输入值alert:
2016-06-10 14:13:20 643
转载 更改eclipse的启动画面
方法1:在\plugins\org.eclipse.platform_xxxxxxxxx 目录下用想要的图片更换原有的splash.bmp即可 方法2:修改启动参数:eclipse.exe -vmargs -Dosgi.splashLocation=图片路径(如 C:\picture_path\splash.bmp) 或在eclipse.ini中加入:-Dosgi.s
2016-06-08 12:39:39 1514
转载 Archetype creation(maven创建模板)
Archetype creationCreating an archetype from an existing project involves three steps:the archetype resolutionthe archetype installation:deploymentthe archetype usage Usage Calling mvn archetype:
2016-06-07 22:30:43 426
原创 eclipse maven创建web project
写在前面的话:网上的教程不知道都不适用于我的环境,遇见的问题是我先创建maven project,选择archetype或者不选择,选webapp的archetype但是会缺少/src/main/java,/src/test/java/,/src/test/resources,不选择,是可以创建并且添加4个文件夹,但是在转换的时候出现不了web-inf和web.xml本次采用的方法是先创建web工程
2016-06-07 18:53:11 384
翻译 java为什么不能重写静态方法
java为什么不能重写静态方法问题链接Question: Why is it not possible to override static methods? If possible, please use an example.Answer: Overriding depends on having an instance of a class. The point of po
2016-06-07 13:33:56 742
原创 Nexus OSS 3.0 Maven搭建
Nexus OSS搭建 文档来源下载Nexus OSS. 从sonatype下载.本次我们下载的是zip包.设置JDK。 Nexus Repository Manager requires a Java 8 Runtime Environment (JRE) from Oracle. 如果有多个jdk或者jre的时候,需要在脚本中设置. To set the path for
2016-06-07 11:56:08 10154 4
翻译 Maven私服(Best Practice - Using a Repository Manager)
Maven私服(Best Practice - Using a Repository Manager)A repository manager is a dedicated server application designed to manage repositories of binary components. The usage of a repository manager is cons
2016-06-06 15:18:31 783
翻译 Unicode和UTF-8的区别
Unicode和UTF-8的区别 As Rasmus states in his article “The difference between UTF-8 and Unicode?” (link fixed):译:像Rasums在他的文章中写明的:”UTF-8和unicode的区别是什么” If asked the question, “What is the difference b
2016-06-03 15:59:57 603
翻译 一则关于eclipse的ctrl+alt+down不能使用的例子
一则关于eclipse的ctrl+alt+down不能使用的例子 FYI, though this may be different from your case, here is my experience. Ctrl+Alt+Up/Down doesn’t work after disabling hot-keys in Intel Graphics Control Panel.
2016-06-03 09:32:22 971
转载 java基本类型的初始值
java基本类型的初始值注意:只有当基本类型是class的fields的时候才会被初始化,如果是local variable,在方法中的定义的话是不可以初始化的,在编译阶段会报错.package com.test;public class FieldsReferenceTest { /* * 8种基本类型 * 1.int * 2.float * 3.d
2016-06-03 08:58:40 369
转载 Memory leak
Memory leakFrom wiki: Memory leaks are a common error in programming, especially when using languages that have no built in automatic garbage collection, such as C and C++. Typically, a memory leak o
2016-06-02 09:35:49 381
原创 Inheritance
InheritanceQ:为什么要继承 You have two ways to differentiate your new derived class from the original base class. The first is quite straightforward: You simply add brand new methods to the derived class
2016-06-01 14:09:46 281
原创 面向对象编程特点
面向对象编程特点Everything is an object . Think of an object as a fancy variable; it stores data, but you can “make requests” to that object, asking it to perform operations on itself. In theory, you can
2016-06-01 11:06:40 391
netty in action 中文版 高清带目录 来个最便宜的
2018-04-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人