
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

There is no doubt that technology is one of the most rapidly growing industries in the world. If you are considering a career in technology, it is important to ask

In today’s world, you can’t take cybersecurity too seriously and you can’t have policies that are too strict. Cybercrime is constantly rising and is a major concern for everyone, including

For too long, the restaurant industry has been relying on the same business model that the first restaurateur used so many millennia ago: get customers, serve them food. And while

As you run your business, you probably take numerous steps to save as much money as possible. Reusing equipment and changing the lightbulbs you use will save you small amounts

Online businesses operate through the internet. Beyond that, however, their business models vary. Just like physical companies, they use different structures and strategies to serve customers. Some ship products ordered

Modern technology enables businesses to integrate their communications platforms like never before. Companies can now have employees communicate through different methods using one software suite. This makes communications more efficient

What’s one important security question I should ask a potential SaaS vendor? The Young Entrepreneur Council (YEC) is an invite-only organization comprised of the world’s most promising young entrepreneurs. In partnership with

For small businesses, efficiency is the name of the game. If small operators can’t perform their essential functions with as little wasted time, effort, or money as possible, their larger
For small business leaders, nothing is more fraught than trying to decide which tech tools are worth the price of entry. In 2020, small businesses need a strong slate of

Technology is modifying the modern workplace, for the better. It doesn’t matter the size of your business, technology can offer benefits that will provide your team with the things they

When developing enterprise software for your business, it’s important to consider integration. In other words, how well will your in-house developed software integrate with popular systems used by management and

Teamwork on a project isn’t easy, especially when a team comprises developers. The best ones are confident and independent, which are traits not always conducive to a collective effort. That

Loyal and happy customers often indicate a business with a healthy customer service team and workflow. But what if your customer satisfaction (CSAT) scores are low, and your first contact

Every aspect of your business involves the collection of data. Your sales, marketing, and even employee performance encompass valuable insight through numbers. In simplest terms, cloud analytics is a way

It doesn’t matter what type of business you’re running or even the industry that you’re operating in. Organizations are forever looking for new and innovative ways to cut costs. They’re

When it comes to the digital landscape, bots are everywhere. The term “bots” is short for robots — virtual robots, that is. These software programs — designed to imitate human

If you want your business to succeed in the modern world, you need to make sure it’s equipped with all the best software tools. Software boosts your performance in a

The internet is a vast and powerful place. It is constantly fueling innovation and bringing the world together. Even so, cybersecurity remains a persistent and growing concern for internet users

No longer constrained to enterprise systems, database-driven applications or web service layers, with XNA, .NET developers can now spread their digital wings and let their pixelized imagination run wild. Their

As our modern world continues to evolve, the relationship between technology and business is adapting constantly. The rapid growth of the gig economy has produced massive changes in the way

Updated April 2026. MySQL’s FULLTEXT indexes turn the classic LIKE ‘%keyword%’ pattern into a proper natural-language search — fast, ranked, and stopword-aware. On a one-million-row text column the difference is

Spring Data’s Query By Example (QBE) API is still one of the simplest ways to build dynamic, type-safe queries without hand-writing JPQL or a Criteria chain. You populate a probe
To log transactions details in a Spring Boot application simply add the following settings in application.properties: logging.level.ROOT=INFO logging.level.org.springframework.orm.jpa=DEBUG logging.level.org.springframework.transaction=DEBUG logging.level.org.hibernate.engine.transaction.internal.TransactionImpl=DEBUG Related Articles How to Set hibernate.format_sql in a Spring Boot
To log HikariCP details simply add in application.properties the following settings: logging.level.com.zaxxer.hikari.HikariConfig=DEBUG logging.level.com.zaxxer.hikari=DEBUG If you need a deeper level of details then replace DEBUG with TRACE.

The java.lang.Math package ships with several methods related to Euler’s number (e ≈ 2.71828) that are easy to overlook. Two of them, Math.exp(x) and Math.expm1(x), come up all the time
JAR file in Java is a compressed format and is used for packaging of the deliverables. At times, you may want to manipulate this file.Below example indicates a scenario for the same. import java.util.jar.*;import java.io.*; public class RetrievingJarEntry{ public static void main(String args[]) { RetrievingJarEntry retrievingJarEntry = new RetrievingJarEntry(); retrievingJarEntry.proceed(); } private void proceed() { String sourceJarFile = “files/contacts.jar”; String sourceFile = “2.txt”; String destFile = “files/new2.txt”; try{ JarFile jarFile = new JarFile(sourceJarFile); JarEntry jarEntry = jarFile.getJarEntry(sourceFile); System.out.println(“Found entry: ” + jarEntry); if ( jarEntry != null) { //Getting the jarEntry into the inputStream InputStream inputStream = jarFile.getInputStream(jarEntry); //Creating a output stream to a new file of our choice FileOutputStream fileOutputStream = new java.io.FileOutputStream(destFile); System.out.println(“Attempting to create file: ” + destFile); while (inputStream.available() 0) { fileOutputStream.write(inputStream.read()); } System.out.println(“Created file: ” + destFile); fileOutputStream.close(); inputStream.close(); } }catch(IOException ioe) { System.out.println(“Exception: ” + ioe); } }} /* Expected output: [root@mypc]# java RetrievingJarEntryFound entry: 2.txtAttempting to create file: files/new2.txtCreated file: files/new2.txt */ //Please note: You have to create a folder with name files and a jar file contacts.jar which has files 1.txt, 2.txt and 3.txt
Enums are predefined place holders in Java. Knowing the contents of an enum will be handy in many instancesLet us look at how to navigate the elements of an enum public class NavigatingAnEnum{ public static void main(String args[]) { NavigatingAnEnum navigatingAnEnum = new NavigatingAnEnum(); navigatingAnEnum.proceed(); } enum Criteria { LOW, MEDIUM, HIGH } private void proceed() { System.out.println(“Elements of the enum Criteria…”); for (Criteria criteria : Criteria.values()) { System.out.println(criteria); } }} /* Expected output: [root@mypc]# java NavigatingAnEnumElements of the enum Criteria…LOWMEDIUMHIGH */
PasswordAuthentication holds the data that will be used by the Authenticator. The username and password are stored in the PasswordAuthentication object. The methods getUserName() and getPassword() are made available that return the userName and password respectively. import java.net.PasswordAuthentication; public class UnderstandingPasswordAuthentication{ public static void main(String args[]) { UnderstandingPasswordAuthentication understandingPasswordAuthentication = new UnderstandingPasswordAuthentication(); understandingPasswordAuthentication.proceed(); } private void proceed() { //Initializing the user name String userName = “devUser”; //Initializing the password – This is a char array since the PasswordAuthentication supports this argument char[] password = {‘d’,’e’,’v’,’U’,’s’,’e’,’r’}; PasswordAuthentication passwordAuthentication = new PasswordAuthentication(userName, password); System.out.println(“Details being retrieved from PasswordAuthentication object post initializing”); System.out.println(“UserName: ” + passwordAuthentication.getUserName()); //The below getPassword actually returns the reference to the password as per the Java API documentation. System.out.println(“Password: ” + passwordAuthentication.getPassword()); //You can get the password in normal string System.out.println(“Password: ” + String.copyValueOf(passwordAuthentication.getPassword())); }} /* Expected output: [root@mypc]# java UnderstandingPasswordAuthenticationDetails being retrieved from PasswordAuthentication object post initializingUserName: devUserPassword: [C@15db9742Password: devUser */
HashMap is a class which which facilitates storing data in the form a key value pair. One thing to note of HashMap is that this is not synchronized and has to be used with caution in multi threaded environment. We may find cases where the key is not present and we maybe trying to perform operations using the key. Following method will help us in using a default value when the key in question is not available in the avaialble set of data. import java.util.HashMap; public class UnderstandingHashmapGetOrDefault{ public static void main(String args[]) { UnderstandingHashmapGetOrDefault understandingHashmapGetOrDefault = new UnderstandingHashmapGetOrDefault(); understandingHashmapGetOrDefault.proceed(); } private void proceed() { HashMap hashMap = initHashMap(); int currencyId = 12; System.out.println(“Value of currency ” + currencyId + ” is ” + hashMap.getOrDefault(currencyId, “Unknown”)); currencyId = 100; System.out.println(“Value of currency ” + currencyId + ” is ” + hashMap.getOrDefault(currencyId, “Unknown”)); } private HashMap initHashMap() { //HashMap declaration with 2 arguments (Integer and String) HashMap hashMapCurrency = new HashMap(); //Adding predefined contents to the HashMap hashMapCurrency.put(10, “Ten Dollars”); hashMapCurrency.put(20, “Twenty Dollars”); hashMapCurrency.put(50, “Fifty Dollars”); hashMapCurrency.put(100, “Hundred Dollars”); hashMapCurrency.put(200, “Two Hundred Dollars”); return hashMapCurrency; } } /* Expected output: [root@mypc]# java UnderstandingHashmapGetOrDefaultValue of currency 12 is UnknownValue of currency 100 is Hundred Dollars */
java.lang.Math has numerous methods and our interest here is toIntExact() method.Consider the following example public class MathExact{ public static void main(String args[]) { MathExact mathExact = new MathExact(); mathExact.proceed(); } private void proceed() { long l = 100000000; int i = (int) l; System.out.println(“i: ” + i); System.out.println(“Math.toIntExact(“+l+”);: ” + Math.toIntExact(l)); }} /* Expected output: [root@mypc]# java MathExacti: 100000000Math.toIntExact(100000000);: 100000000 */











