Java

Information, discussions, resources, news and answers to your questions about the widely used programming language.

How to Write a Game Runner Program

Cards
I wrote the runsevens game runner program to automate the running of the Tournament of Sevens programming challenge, and it was an interesting little project. It’s designed to do the following: Maintain a ladder of players. Run games of Sevens for a number of players by executing standalone exes. Update the ladder with games’ results. That’s a fairly high-level view. Running each game of Sevens also requires shuffling a deck of cards, dealing them to the players and tracking card… continue…

Is Apache Spark the Next Big Thing in Big Data?

Data Transfer
In any article or blog post, any mention of Big Data usually includes something about Hadoop. When it comes to Big Data, Apache Hadoop has been the big elephant in the room, and the release of Hadoop 2.0 in 2013 made the environment easier and more stable. But even with the inclusion of Impala for querying stored information real-time, Hadoop is still a batch-based system that processes data in, well, batch mode. Big Data processing is said to have three… continue…

Tournament of Sevens: Week 1 Results

Marathon
Though the Tournament of Sevens coding challenge took much longer to get off the ground than expected, I’ve taken steps to sort out the bot bugginess and the contest is now roaring ahead. The first week included 16 viable competitors, out of 19 entries. One obstacle in getting this going was from Eclipse projects. The problem with them is that their source files end up in different places and the IDE is a bit fiddly building and deploying the class… continue…

Interview Questions for Java Developers

Posted In Java, Looking in Tech
Dice Interview Qs Icon
With an estimated 9 million developers using it, Java is one of the most popular programming languages around. In fact, some estimate that Java powers more than 3 billion devices. With so many people claiming expertise, IT managers often ask tricky technical questions to separate the novices from senior developers, says David Bolton, guide of the Dice Java Talent Community. Here are some questions you can expect to hear. What is Type Erasure? What Most People Say: “Umm, I’m not… continue…

Why Managed Code is Safer

C# as Machine Code
One of the biggest sea changes in computing took place in the late 1990s, with the switch over to running managed code, first with Java and then a couple of years later with .NET. Prior to this, compiled code (typically written in C, C++, Visual Basic or Delphi/Pascal) produced unmanaged code. Yes, both of these run machine code. So what’s the difference? Unmanaged Code Unmanaged code is just low level code (machine code) that the CPU (Central Processing Unit) executes… continue…

How Reactive Can Beat Conventional Procedural Programming

Java Code
In a post on Slashdot, Val Huber, CTO at Espresso Logic in Santa Clara, Calif., did a comparison of Reactive Programming to Java with Hibernate and MySQL triggers using a real-life business example. In the test, Reactive Programming surpassed conventional procedural programming models with a faster time to market, reduced maintenance, better quality and a higher level of transparency. Using a simple scenario involving customers with purchase orders consisting of line items, Huber compared what it takes to implement business… continue…

Generating Not-So-Random Numbers With Java’s Random Class

Dice Snake Eyes
All programming languages have random number generator classes or libraries, which produce sequences of random numbers. Those sequences are similar to pi in that they run on forever (well, sort of). As Harold explains to a class of bored teenagers in this Person of Interest clip, because pi runs forever (though so far only 10 trillion digits have been computed) every number or word that exists can be found within it. The same can be said of sequences of random… continue…

Key Differences Between C# and Java

Java vs. C#
Any comparison of C# and Java’s language features will always be contentious. The parable about the three blind men describing an elephant illustrates the issue well —  no one developer has used or experienced all the features of the current C# or Java versions. I certainly haven’t. This comparison focuses on the ways Java 7 and C# 5 differ. Java 8 is scheduled to become generally available in March 2014 and C# 6.0 will likely appear sometime in 2014 as… continue…

Coding Challenge: Best Have a Card Up Your Sleeve

Seven-Cards-Thumbnail
Our newest coding challenge runs through January, ending on Jan. 31, 2014, so you should have plenty of time for it. It’s about a card game called Sevens. The game is for three to seven players. To set it up, deal all 52 cards between the players. Depending on the number playing, and whether or not 52 is divisible by that, they may not all get the same number of cards: If there are three players, the first player ends… continue…

Improve Your Job Search With a Personal Project

Design-an-App-Thumbnail
More and more, hiring managers tell us that they want to hire candidates who work on personal projects outside of their jobs. Don’t believe me? Just check out a few of our recent Landing@ stories. They say the first place they look up a potential candidate is on Github. Personal projects and open source contributions are both great ways to demonstrate passion for the industry. They show initiative and can be a great way to sharpen your coding skills before… continue…