Java
chanryma
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Java: Instance Initialization
Instance Initialization is for initializingnon-static variables for each object (whilestatic for class). The blue blockis executed before either one of the constructors, so it guaranteescertain op原创 2015-08-27 17:24:05 · 985 阅读 · 0 评论 -
Java: A Puzzle about Constructor…
package cn.com.sina.blog.chanryma.interf;public interface IAction { voidwalk();}package cn.com.sina.blog.chanryma.impl;import cn.com.sina.blog.chanryma.interf.IAction; public class Human {原创 2015-08-27 17:24:15 · 366 阅读 · 0 评论 -
Java: Exception Trace Kick off
Exception Trace Kick off" TITLE="Java: Exception Trace Kick off" />Exception Trace Kick off" TITLE="Java: Exception Trace Kick off" />In the program, throwException() is called inmain(). With a原创 2015-08-27 17:24:34 · 411 阅读 · 0 评论 -
Java: Simulation of printStackTr…
Something is not that mysterious as it appears tobe.Simulation of printStackTrace" TITLE="Java: Simulation of printStackTrace" />Simulation of printStackTrace" TITLE="Java: Simulation of printSta原创 2015-08-27 17:24:40 · 475 阅读 · 0 评论 -
Java插入MySQL中文出现乱码
Java读到的数据没有乱码,但是插入MySQL数据库后中文全成了乱码。原创 2015-11-03 19:32:12 · 549 阅读 · 0 评论 -
Jar文件配置文件路径问题
在Eclipse中运行的时候,一切正常。把Java工程导成了可运行Java文件,通过java -jar XX.jar命令运行的时候,会报异常说配置文件路径找不到.原创 2015-11-11 19:52:10 · 2826 阅读 · 0 评论 -
Web工程中配置文件路径问题
Web工程中,配置文件放的位置和读取方式的总结。原创 2015-11-11 20:22:03 · 3169 阅读 · 0 评论 -
Java导出可运行jar文件
Java生成可运行Jar文件。原创 2015-11-11 19:23:48 · 716 阅读 · 0 评论 -
Mysql中文查询没有结果
一个Web工程用的是Mysql。用中文字符串作为查询条件,查不到结果。查询条件:"select date, title, img, contentfrom news where title=?;"调试发现执行 sttmt.setString(1,newsTitle);的时候newsTitle也没乱码。数据库里有满足条件的数据,也是中文,并且数据库里也没乱码。搜了一下,需要改MySQL原创 2015-08-27 17:25:07 · 1429 阅读 · 0 评论 -
Java: Keyword final
With a primitive, final makes the value aconstant. Once the reference is initialized to an object, it cannever be changed to another object. However, the object itself canbe modified. …… This res原创 2015-08-27 17:24:02 · 409 阅读 · 0 评论 -
Java: Snack from Constructor
Description:Good in this example isan abstract base class, which has a non-defaultconstructor that calls for a name.Food is a derived class ofGood. There are two constructors inFood, one is that原创 2015-08-27 17:24:27 · 454 阅读 · 0 评论 -
Java: Special Point about Name o…
Generally, there must be a public class in a compilationunit (a java file) whose name is exactly the same with the file.Like, if there is a file named Main.java, therewill be a class like:public c原创 2015-08-27 17:24:00 · 425 阅读 · 0 评论 -
在Eclipse中启动Tomcat, 访问不了
问题:在系统服务中启动Tomcat,项目工程能够访问。在Eclipse中配置Server,然后启动,访问不了,连Tomcat首页都访问不了。解决:搜了一下,http://blog.youkuaiyun.com/kenchow126/article/details/8536481解决了我的问题。“原来在eclipse中的server中添加一个新的服务时,eclipse默认值有点小问题。”,一下原创 2015-08-27 17:25:05 · 523 阅读 · 0 评论 -
Got an exception - Unexpected character 0xfeff in identifier
用CheckStyle检查代码,出现Got an exception - Unexpected character 0xfeff in identifier。原创 2016-04-10 15:41:11 · 5409 阅读 · 0 评论
分享