分類彙整: java 1 對 1 私人補習

Java Tip 132: The taming of the thread

Threads can be nasty beasts. This is partly attributed to their delicate nature. Threads can die. If the causes of thread death are not in your code, then MutableThread may keep your code running. This article explores a solution using an object-orient… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 132: The taming of the thread〉中留言功能已關閉

Java Tip 131: Make a statement with javac!

Often you may want to test a single piece of code. For example, say you forget how the % operator works with negative numbers, or you must determine how a certain API call operates. Writing, compiling, and running a small program repeatedly just to tes… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 131: Make a statement with javac!〉中留言功能已關閉

Java Tip 130: Do you know your data size?

Recently, I helped design a Java server application that resembled an in-memory database. That is, we biased the design toward caching tons of data in memory to provide super-fast query performance.Once we got the prototype running, we naturally decide… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 130: Do you know your data size?〉中留言功能已關閉

Java Tip 129: SGLayout—a layout manager for the rest of us

A good layout manager proves essential for creating a good graphical user interface (GUI), but many beginner developers find the standard Java layout managers difficult to master. Of these, BorderLayout and FlowLayout generally prove useful, but develo… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 129: SGLayout—a layout manager for the rest of us〉中留言功能已關閉

Java Tip 128: Create a quick-and-dirty XML parser

XML is a popular data format for several reasons: it is human readable, self-describing, and portable. Unfortunately, many Java-based XML parsers are very large; for example, Sun Microsystems’ jaxp.jar and parser.jar libraries are 1.4 MB each. If you are running with limited memory (for example, in a J2ME (Java 2 Platform, Micro Edition) environment), or bandwidth is at a premium (for example, in an applet), using those large parsers might not be a viable solution.

Those libraries’ large size is partly due to having a lot of functionality—perhaps more than you require. They validate XML DTDs (document type definitions), possibly schemas, and more. However, you might already know that your application will receive valid XML. Also, you might already decide that you want just the UTF-8 character set. Therefore, you really want event-based processing of XML elements and translation of standard XML entities—you want a nonvalidating parser.

To read this article in full, please click here

閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , | 在〈Java Tip 128: Create a quick-and-dirty XML parser〉中留言功能已關閉

Java Tip 127: See JAR run

You can easily package an application’s entire set of classes and resources into a Java Archive (JAR). In fact, that is one goal of having jar files. Another is to let users easily execute the application stored in the archive. Why then are jar files second-class citizens in the Java universe—functioning only as archives—when they can be first class, right alongside native executables?

To execute a jar file, you can use the

java

command’s

-jar

option. For example, say you have a runnable jar file called

myjar.jar

. Because the file is runnable, you can execute it like this:

To read this article in full, please click here

閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 127: See JAR run〉中留言功能已關閉

Java Tip 126: Prepare cross-server database access methods with JDBC

Java has become increasingly popular as a server-side programming language for database-powered Web applications. Those applications’ business logic-handling methods must work with data from backend databases. Therefore, you need a set of well-desi… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 126: Prepare cross-server database access methods with JDBC〉中留言功能已關閉

Java Tip 125: Set your timer for dynamic properties

Property files are widely used to control application configurations. One great advantage of property files: they let you change your application’s configuration without recompilation. However, you most likely need to restart your application for the n… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 125: Set your timer for dynamic properties〉中留言功能已關閉

Java Tip 124: Trace your steps in Java 1.4

I don’t know about you, but I really like to know where I am. Being a guy, I’m never lost, but sometimes I just don’t know where I am. Some places, such as malls, have maps with “You Are Here” indicators. Similarly, Java now lets us figure out our loca… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 124: Trace your steps in Java 1.4〉中留言功能已關閉

Java Tip 123: Dial into the wireless world

We have all heard the phrase killer wireless application. Unfortunately, those killer apps are more complicated than they look. Competing standards, myriad devices, and different browsers create a difficult development landscape. In this tip, I focus o… 閱讀全文

分類: IT 資訊科技(信息技术), java 1 對 1 私人補習, 熱門新聞 | 標籤: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 在〈Java Tip 123: Dial into the wireless world〉中留言功能已關閉