JAVA
![Java String length (String size)](/media/new_post_images/Java_String_length.webp)
Java String length (String size)
There is only one method to find the length of a string i.e. the length() method. We will see multi…
![How to Square a Number in Java?](/media/new_post_images/Square_a_Number_in_Java.webp)
How to Square a Number in Java?
There are many ways to square a number in Java, the simplest of which is multiplying the number by …
![What is IOException in Java?](/media/new_post_images/Java_IOException.webp)
What is IOException in Java?
Java is a general-purpose programming language used to develop various applications, websites…
![String Formatting using format in Java](/media/new_post_images/String_Formatting_using_format_in_Java.webp)
String Formatting using format in Java
We usually use System.out.println or System.err.println to print messages on the console. But to us…
![Java String to Float](/media/new_post_images/Java_String_to_Float.webp)
Java String to Float
Many beginners want to know how to convert Java String to Java float. All String operations are eas…
![Java Best Practice: Return a List, not a LinkedList](/media/new_post_images/Java_Best_Practice_Return_a_List_not_a_LinkedList.webp)
Java Best Practice: Return a List, not a LinkedList
Java List is used to store an array of similar objects, for example, groups of numbers, categories …
![How to Populate a Static List in Java?](/media/new_post_images/How_to_Populate_a_Static_List_in_Java.webp)
How to Populate a Static List in Java?
In previous articles, we have seen methods to add numbers from a static list using Java 7 and 8 ver…
![Java ternary operator examples](/media/new_post_images/Java_ternary_operator_examples.webp)
Java ternary operator examples
Java ternary operators make the code short and easy to understand. They can replace an entire set o…
![How to read a file from a Jar](/media/new_post_images/How-to-read-a-file-from-a-Jar-TGB.webp)
How to read a file from a Jar
Introduction If you are trying to read a text file from Jar using the File class, stop right the…
![How to encode java string to send web server URL](/media/new_post_images/How_to_encode_java_string_to_send_web_server_URL.webp)
How to encode java string to send web server URL
If you work on web applications, it is essential to know how to encode a String to pass it in URL s…
![How to use DecimalFormat?](/media/new_post_images/How_to_use_DecimalFormat.webp)
How to use DecimalFormat?
NumberFormat classes, including DecimalFormat, are packaged in the java.text package in Java. These…
![Finally block in Java](/media/new_post_images/Finally_block_in_Java.webp)
Finally block in Java
Java allows the use of the finally block that allows you to execute the critical code. This block w…