sort by date

developerWorks (IBM)
Focus On Java

sitios en español

Building Java (and Android) Apps on the Blockchain [Slideshow]
Conor Svensson04/23/2017 at 05:01:01

I gave a tech talk at Pivotal Labs today on developing Java applications on the Ethereum blockchain.

The slides are available below.

Java 9 (Part 2): JShell Step by Step
Tomer Ben David04/22/2017 at 05:01:01

In Part 1 of this Java 9 tutorial series, we covered Java 9 modules. Here in Part 2 of this series, we are going to explore JShell. Any up-to-date programming language has a REPL. In today's world, where you have two-week sprints and you need to learn while coding, it's important to have a fast feedback loop. You don’t want to set up a whole project just to test something in the code, right? The REPL brings that to you. REPLs are common in Scala, Python, Ruby, Shell scripts, and now also in… Java!

Java 9 has the following new features:

Kotlin and Java EE (Part 1)
Željko Trogrlić04/21/2017 at 20:44:28

One of the main strengths of Kotlin is good Java integration. As it is fairly easy to convert Java to Kotlin, it seems that making Java EE applications in Kotlin should be a no-brainer. However, there are some subtle differences between the two that make conversion tricky:

  • While most frameworks require non-final classes, Kotlin classes are final.
  • Injection will introduce a lot of unnecessary null checks.
  • Both of these and mandatory parameterless constructors will ruin attempts to write functional-style code.

Java EE and Kotlin are not really best friends unless you make them. Luckily, all those issues can be avoided.

Catching Exceptions in Scala (Part 2)
Bharat Singh04/21/2017

It’s time to continue our previous blog on how to make our code more robust, concise, and more functionally defined at the same time. Here, we are moving more toward Scala and leaving traditional Java behind. We will see new types and their usage along with the benefits we get from them.

This blog will show you the best way, in my perspective, to handle the exceptions gracefully in Scala (the beloved coding language for everyone here at Knoldus). Our methods would only be responsible for either returning the results or the exceptions, i.e. we will not write any try-catch blocks to handle the exceptions within different methods.

Best Practices for Multithreading in Java
Get a glimpse at the basics of threads and multithreading and the best practices that should be adopted when working with multithreading in enterprise applications.
Creating a Spring Read Only and Native Query
Language: Enterprise, Expertise: Intermediate — For reading operations, the transaction configuration readOnly flag should be set to true and in order to execute native queries, the @Query annotation parameter, nativeQuery flag, should be set to true.
Accessing and Managing Third-Party Libraries
Learn about package management in your programming language and take advantage of all the goodness that's out there.
Using a JDBC Template
Language: Java, Expertise: Intermediate — Spring provides a nice abstraction on top of the JDBC API using JdbcTemplate and also provides great transaction management capabilities using annotation-based approach.





Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. javasight is independent of Sun Microsystems, Inc.