Skip to main content

Be a part of Java Cambodia Group Now

Keep our discussion in our group forum at: https://groups.google.com/forum/#!forum/javacambodia

Please be a part if you want to know about Java Programming in Cambodia

Comments

Popular posts from this blog

Exercise 1: 99 Bottles of Beer

Let’s put all your new Java skills to good use with something practical. We need a class with a main(), an int and a String variable, a while loop, and an if test. A little more polish, and you’ll be building that business backend in no time. But before you look at the code on this page, think for a moment about how you would code that classic children’s favorite, “99 bottles of beer.” There’s still one little flaw in our code. It compiles and runs, but the output isn’t 100% perfect. See if you can spot the flaw , and fix it. public class BeerSong { public static void main (String[] args) { int beerNum = 99; String word = “bottles”; while (beerNum > 0) { if (beerNum == 1) { word = “bottle”; // singular, as in ONE bottle. } System.out.println(beerNum + “ ” + word + “ of beer on the wall”); System.out.println(beerNum + “ ” + word + “ of beer.”); System.out.println(“Take one down.”); System.out.println(“Pass it around.”); beerNum = beerNum - 1; if (...

Let's Learn Java - JavaEE Sample and Vaadin Sample

Please find two presentations recently made during Barcamp Phnom Penh last weekend. JavaEE With Server and Client test to illustrate how Java Enterprise works with EJB 3. Find presentation and source at:  https://github.com/JavaCambodia/JavaEE-Sample Vaadin The sample and presentation to illustrate how power of Vaadin for those who has even basic knowledge in Java. Vaadin is about UI which you can code a very nicely interface for business application. You can find the presentation and source at:  https://github.com/JavaCambodia/Vaadin-ContactSystem Community Get in touch together: - Community: at Google+ Community - JavaCambodia @ Slack, to submit here to get invitation to join the chat.

Java 1.8 (JDK8): What's new?

We have now Java 1.8, let's read some well explain articles. Here are some I have extracted. Interesting Feature Here are the new Java 1.8 features : Lambda expressions Remove the Permanent Generation Small VM Parallel Array Sorting Bulk Data Operations for Collections Define a standard API for Base64 encoding and decoding New Date & Time API Provide stronger Password-Based-Encryption (PBE) algorithm implementations in the SunJCE provider Here is the full list of the features of Java 1.8 . Performance According to the article shows that Java 1.8 performance is similar to Java 1.7. Here are the results: Java 1.6 Java 1.7 Java 1.8 Test 1 3564ms 3653ms 3614ms Test 2 27265ms 28773ms 28326ms Test 3 6220ms 6579ms 6231ms Test 4 408ms 428ms 423ms Test 4 (parallelSort) 193ms Read more: http://ttux.net/post/java-8-new-features-release-performance-code/ https://vaadin.com/blog/-/blogs/no-need-to-wait-java-8-it-s-great