Posts tagged ‘Java’

 

Trivia question – “Finally”

Read full article  | No Comments

Here is a confusing question – what does the next code prints? public static void doStam() { try { doExcption(); return; } finally { System.out.println(“Finally”); } } public static void main(String[] args) { doStam(); } public static void doExcption() { String [] stam = new String[0]; //purpose exception stam[1].toString(); } Answer: Finally Exception in thread [...]

Read More

Apache Pivot. Making Java GUI is easy.

Read full article  | No Comments

I just got to know to Pivot and I have to say, I love it. Pivot is a technology to create Java applets for RIA or desktop applications with the use of XML and/or code. When I write applications at home I don’t want waste time writing swing or applets myself. Pivot helps me designing [...]

Read More

Java Interface rules

Read full article  | 4 Comments

Let’s start with a short Java question: Bellow you can see the interface ‘Test’. Which lines in that interface will be rejected by the compiler? The answer is: lines: 7,8,9,10 I am sure that even many of the experienced java developers will not have a 100% success answering this question because it can be confusing. [...]

Read More

Weekend project: Bluetooth multisender

Read full article  | 6 Comments

In my last post I have shown you how to communicate with Bluetooth devices using java + Bluecove.jar. Using this knowledge I have created this small java weekend project – Bluetooth multisender. This program will scan for Bluetooth devices in the area. For each Bluetooth device found, it will check whether it can receives text [...]

Read More

Connecting to Bluetooth devices with Java

Read full article  | 6 Comments

In this post I will show you how to use java to connect to Bluetooth devices. To do that, I will use bluecove. Bluecove is a JSR-82 implementation. JSR-82 is a java specification for defining APIs for communicating with Bluetooth devices. To use bluecove you will have to download bluecove jar. You can download it [...]

Read More

Create your own Java customized annotations

Read full article  | No Comments

Annotations is a relatively new technology, it was added to the language in Java5. An annotation is a meta data that can be attached to a java class, member, function or a parameter. It gives information about the element that is annotated. An example is the Deprecated annotation that specifies this function is old and [...]

Read More