• 16 September

    Convert String to Path in Java

    In this post, we will see how to convert String to Path in Java. Using Paths’get() method [ Java 7 ] To convert String to Path, use jva.nio.file.Paths's get() method. It is a static method. Here is an example: [crayon-678d1873cddd0477122581/] Output: [crayon-678d1873cddd7128898798/] You can also join multiple strings using Paths‘s get() method. It will join […]

  • 15 September

    How to Replace Space with Underscore in Java

    Learn about how to replace space with underscore in java. Replace space with underscore in java 1. Using replace() method Use String’s replace() method to replace space with underscore in java. String’s replace() method returns a string replacing all the CharSequence to CharSequence. Syntax of replace() method: [crayon-678d1873ce0b1654912715/] [crayon-678d1873ce0b6789052815/] Output: This_blog_is_Java2blog As you can see, […]

  • 15 September

    How to Replace Comma with Space in Java

    Learn about how to replace comma with space in java. Replace comma with space in java 1. Using replace() method Use String’s replace() method to replace comma with space in java. Here is syntax of replace() method: [crayon-678d1873ce1a7015415837/] [crayon-678d1873ce1aa688863936/] Output: 1 2 3 4 As you can see, replace() method replaced each comma with space […]

  • 15 September

    How to Get Temp Directory Path in Java

    In this post, we will see how to get temp directory path in java. Get Temp Directory Path in Java Using System.getProperty() To get the temp directory path, you can simply use System.getProperty("java.io.tmpdir"). It will return default temporary folder based on your operating system. Default temp directory path Windows : %USER%\AppData\Local\Temp Linux/Unix: /tmp Let’s see […]

  • 15 September

    Remove Last Element from Vector in C++

    Learn about how to remove last element from Vector in C++. C++ provides a very useful data structure called vectors. These objects are similar to arrays in storing similar elements under a common name. However, they have a very useful additional feature. Vectors are dynamic in C++, which means that we can remove and add […]

  • 29 June

    Get Day Name from Date in Python

    In Python, there are many situations where days and dates are involved. For example, to specify a particular time frame of a task, including dates in a data frame, etc. This tutorial will tell how day names can be found from a specific date mentioned in Python. There are various many ways to perform this. […]

  • 25 June

    Convert Roman Number to Integer in Python

    In this post, we will see how to convert roman number to integer in python. How to Convert Roman Number to Integer in Python There are multiple ways in which numbers can be represented in the world of Python programming. Roman literals are one such approach to representing numbers in Python. Often times there is […]

  • 11 June

    Remove Single Quotes from String in Python

    The article has been carefully divided into three parts, with the first part focusing on the different ways available to remove single quotes from string in Python, while the second part focusing on the different ways available to remove double quotes from string in python. The final part of the article demonstrates how to remove […]

  • 11 June

    Escape Backslash Character in Python

    Escape backslash character in python. The backslash character holds a special place among all the other characters in the world of Python programming. It has multiple uses in Python, although all of them are quite similar to each other. This article demonstrates what is the backslash character and how it can be used in Python. […]