JavaWhizz

  • Home
  • Blog
  • Services
    • Web development
    • Mobile development
    • WordPress development
    • IT Consultancy
  • About
    • Copyright notice
    • Privacy Policy
    • Contact
  • Jobs

david

Core Java

How to get the File extension in Java

In this tutorial, you will learn how to get the File extension of a File in Java. First, you will use the String methods. Next, you will learn how to use regular expressions. The last technique will show how to use the Commons IO library. Create a new project Follow Read more…

By david, 2 months22 September 2023 ago
Core Java

How to read a text file in Java

In this tutorial, you will learn how to read a text file in Java. First, you will learn how to achieve this using the readLine() method of BufferedReader. Second, you will use the readAllLines() method of the Files class. The last step will show how to use the readLines() method Read more…

By david, 2 months21 September 2023 ago
Core Java

How to create a File filter in Java

In this tutorial, you will learn how to create a File filter in Java. A file filter in this case is a program to filter text files in a directory. There are different approaches to achieve this in Java. The techniques covered in this tutorial include: The first two methods Read more…

By david, 2 months18 September 2023 ago
Core Java

How to remove line breaks from a File in Java

In this tutorial, You will learn how to remove line breaks from a file in Java. The examples in this tutorial will cover how to use Java IO, Java NIO, and Commons IO. Create a Maven project To create a new Maven project, use the following link which will redirect Read more…

By david, 2 months14 September 2023 ago
Core Java

How to get the number of lines from a text File in Java

In this tutorial, you will learn how to get the number of lines from a text File in Java. Create a text file Create a file named data.txt under the root directory. Next, copy and paste the following text content into the file. All the examples that you will learn Read more…

By david, 2 months5 September 2023 ago
Core Java

How to convert a String to a String Array in Java

In this tutorial, you will learn how to convert a String to a String Array in Java. There are two approaches you can use depending on the output desired. The first approach is to convert the individual sequence of characters to a String Array. The second approach will use the Read more…

By david, 2 months5 September 2023 ago
how to create a String template in Java - featured image
Core Java

How to create a String template in Java

In this tutorial, you will learn how to create String templates in Java. A String template is a String created with dynamic variables as part of the String. For example, a String created using data from the database is a String template. A common use case for String templates is Read more…

By david, 3 months4 September 2023 ago
how to convert Double to String in Java - featured image
Core Java

How to convert Double to String in Java

In this tutorial, you will learn how to convert a Double to a String in Java. The double data type is one of the primitive types in Java that you can use when working with numerals. When working with decimals, this is the recommended type to go for. Despite this, Read more…

By david, 3 months ago
Core Java

Check if a String is an Integer in Java

In this tutorial, you will learn how to check if a String is an Integer in Java. To achieve this, first, you will learn how to use the matches() method of the String class. Second, you will use the Integer.parseInt() method of the Integer class. Finally, you will use the Read more…

By david, 3 months17 August 2023 ago
Core Java

How to convert an InputStream into a String in Java

In this tutorial, you will learn how to convert an InputStream into a String in Java. The tutorial will cover the recommended approaches and the most straightforward ones. For those new to InputStream, it is a class used to read bytes of data. These data can be from a file, Read more…

By david, 3 months15 August 2023 ago

Posts navigation

1 2 3 Next
  • Blog
  • Contact
  • Copyright notice
  • Home
  • IT Consultancy
  • Jobs
  • Mobile development
  • Privacy Policy
  • Sample Page
  • services
  • Web development
  • WordPress development
Hestia | Developed by ThemeIsle