Home » Author Archives: Dustin Marx (page 11)

Author Archives: Dustin Marx

Connecting to Cassandra from Java

In my post Hello Cassandra, I looked at downloading the Cassandra NoSQL database and using cqlsh to connect to a Cassandra database. In this post, I look at the basics of connecting to a Cassandra database from a Java client. Although there are several frameworks available for accessing the Cassandra database from Java, I will use the DataStax Java Client ...

Read More »

Hello Cassandra

A colleague recently told me about several benefits of Cassandra and I decided to try it out. Apache Cassandra is described in A Quick Introduction to Apache Cassandra as “one of today’s most popular NoSQL-databases.” The main page for Apache Cassandra states that the “Apache Cassandra database is the right choice when you need scalability and high availability without compromising ...

Read More »

Handy New Map Default Methods in JDK 8

The Map interface provides some handy new methods in JDK 8. Because the Map methods I cover in this post are implemented as default methods, all existing implementations of the Map interface enjoy the default behaviors defined in the default methods without any new code. The JDK 8 introduced Map methods covered in this post are getOrDefault(Object, V), putIfAbsent(K, V), ...

Read More »

Programmatic Access to Sizes of Java Primitive Types

One of the first things many developers new to Java learn about is Java’s basic primitive data types, their fixed (platform independent) sizes (measured in bits or bytes in terms of two’s complement), and their ranges (all numeric types in Java are signed). There are many good online resources that list these characteristics and some of these resources are the ...

Read More »

New BigInteger Methods in Java 8

Attention to new features in JDK 8 has rightfully been largely focused on new language features and syntax. However, there are some nice additions to the libraries and APIs and in this post I cover four new methods added to the BigInteger class: longValueExact(), intValueExact(), shortValueExact(), and byteValueExact(). All four of the newly introduced “xxxxxExact()” methods throw an ArithmeticException if ...

Read More »

Dubious Aspects of Features of JDK 8

Most of us who develop with Java are generally enthusiastic for the features and improvements that come with JDK 8. However, there have been several recent posts that have pointed out some features that can be misused and abused and might lead to some additional issues in the future. These features, which remind me of the introduction of autoboxing in ...

Read More »

Constructor/Method Parameters Metadata Available Via Reflection in JDK 8

One of the lesser advertised new features of JDK 8 is the optional ability to include parameter metadata in compiled Java classes [JDK Enhancement Proposal (JEP) 118]. This feature allows Java applications to access this parameter metadata information at runtime via reflection. The Java Tutorials‘ Reflection API trail includes a lesson called Obtaining Names of Method Parameters that discusses and ...

Read More »

Compiling and Running Java Without an IDE

A recent Java subreddit thread called “Compiling Java Packages without IDE” posed the question, “is [there] a command that compiles a group of java files that are inside a package into a separate folder (let’s just call it bin), and how would I go about running the new class files?” The post’s author, kylolink, explains that “When I started out ...

Read More »

How to Begin Learning and Applying LaTeX

I recently started working with LaTeX based on a colleague‘s recommendation. To be honest, it was a little steeper learning curve installing it and initially learning it than I’ve become used to when installing and using new software development products and I hope in this post to provide some basic tips to help others who want to investigate this “document ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns