Subscribe to rss rss

Java 7 – New Switch Statement

Posted by : | On : 07-03-2011 | Comments (1)
Java 7 – New Switch Statement
Java SE 7 is still just around the corner. It is still in Beta mode, so many things are still under test. TechieDan has been reading and researching about Java 7 in order to keep abreast of what Java has to offer in the coming future. There is this Project CoinFish that the Java people has put up that there are loads and loads of contribution. As of Java 7, one of these features is the new way of using SWITCH statements. I am sure most programmers would know that a switch statement is just like a if else statement. Though, the switch statement feels cleaner in terms of coding practice. public static void getLove() { int test = 1; switch(test) { case 1: System.out.println("This is number 1"); break; default: System.out.println("Chose no love"); } } The above is a sample switch statement if the method getLove() is called, it will print “This is number 1″. Of course, one thing that many people still uses the if statement is because it is able to compare with Strings. If (StringA.equals(StringB)) System.out.println("It’s the same"); Now fast forward to Java SE 7, you can now use Strings inside a switch statement. TechieDan will now explore this possibility with you and how it has changed in Java SE 7 onwards. It’s still in beta so you can wait till it’s finalized. Here I have a full complete source code so that you can run on your java source code editor and try to run it as an application. public...

Wired Connection – Artnet 8 Port Switch

Posted by : | On : 23-10-2008 | Comments (0)
Wired Connection – Artnet 8 Port Switch
Before my wifi modem actually came to my house, TechieDan was actually using a wired connection between his computers and his other laptops at home. Well, the rest used by other family members of course. So the whole thing was a a wired connection which is linked by one device called the Switch. Most people have their modems with built in router which supports up to 4 ports. Mine didn’t have one so I bought a switch instead. It worked perfectly fine for me. The ArtNet 8 Ports Switch is just a simple device which just act as a connector between network lines and the modem. In other words, it doesn’t have the functionality of a router which can limit the amount of bandwidth used. So having a look at the back of the switch, you’ll noticed the 8 ports. Basically they all have the same function. There is no separate port for the modem to connect to. If you really need extension to your network cabling needs, get a switch. Of course, would rather recommend you to go wireless. But then, if one really need a stable faster transfer speed between networks, yes, opt for cable instead.
f54ccc2c13f4dbf05aeee5ec2125deca58bdb9bbeca7fd7b1e