Java String startsWith() method check if a string starts with prefix argument string. does not accept regex as argument. null argument is also not allowed.
Category: Articles
Java 10 improvements to Garbage Collection explained in 5 minutes
Java 10 has officially been out for almost a month now, and it brought with it some improvements to the G1 garbage collector. Here we explain the changes.
Java String lastIndexOf() method example – HowToDoInJava
Java String lastIndexOf() method. It returns the last index of specified character or string as method argument. If argument is not found it returns -1.
Java String substring() method example – HowToDoInJava
Java String substring() example. Learn to get substring of a string from given start index to end index. A valid index is between 0 and length of string.
Java String hashCode() method example – HowToDoInJava
Java String hashCode() method returns the hash code for the String. Hash code value is used in hashing based collections like HashMap, HashTable etc.
Payara Micro JCA Adapters – Microsoft Azure Service Bus
In this blog, which follows on from the Cloud Connectors in Payara Micro, we will explain the Microsoft Azure Service Bus connector and how to use it in Payara Server and Payara Micro (the Payara Platform).
3 Books to learn Java from Scratch in 2018 – Best of Lot Must Read
I receive half a dozen emails every day asking about which is the best to learn Java from scratch? Which book should I read in 2018 to lear…
Java String endsWith() method example – HowToDoInJava
Java String endsWith() method verifies if given string ends with argument string or not. It does not accept null argument and regex patterns.
Containerising a Spring Data Cassandra application
I’m continuing my journey of learning Docker. I am still keeping it simple at this point. This time …
Payara Services – devoted to Open Source, Java, our customers and the community
Payara Server is a fully supported, developer-friendly, open source application server. Payara Server’s architecture is innovative, cloud-native and optimized for production deployments.
Oracle Java tutorial – static classes – possible error in tutorial
I’m new to Java, learning Java from the Oracle Java tutorial.I’m now learning about nested classes, static classes and inner classes.I found the following explanation which seems odd, and I think…
Playing with JDK 12’s Switch Expressions
In the blog post “JDK Language Feature Preview in Action: Switch Expressions,” I discussed…
Fluent Design Style Text Field And Password Field For Java, JavaFX | Pixel Duke
JMetro 4.5 released with new dark and light Text Field and Password Field style inspired by Microsoft Fluent Design System (previously named Metro).
Java: Mocking a ResultSet using Mockito
This post shows how you can mock a java.sql.ResultSet using Mockito. It can be used to help unit tes…
Understand and Prevent Memory Leaks in a Java Application
Memory leaks are a very real problem in Java and the JVM can only help so much. Learn how to understand leaks, recognize them at runtime and deal with them.