Month: May 2022
1. Check if cURL is installed 2. HTTP GET request 3. HTTP GET request and follow redirects 4. HTTP GET with json 5. HTTP GET with xml 6. Save the output of HTTP GET to file 7. Retrieving only the response headers 8. Retrieving a verbose result using cURL
Find the closest (nearest) integer in the array to zero. Output :
In order to add a word at the beginning or at the end od each line, we must : Open “Find/Replace” Dialog via “Menu/Search/Replace…” or Ctrl+H shortcut. Check “Regular expression” option in “search mode”. 1. Adding a word at the begining of each line : To add a word, such . . . Read more
In order to separate the character string in Java using a separator, we can use the split method of the String class as shown below : Output :
1. Format LocalDateTime with DateTimeFormatter : Output : currentLocalDateTime : 2022-05-28T11:13:13.675 currentLocalDateTime : 2022-05-28 11:13:13 2. Convert String to LocalDateTime Output : dateString : 2022-05-01 16:25 formatDateTime : 2022-05-01T16:25 formatDateTime after format : 2022-05-01 16:25
1. Requirements : For executing any Java program, the following software or application must be properly installed. Install the JDK if you don’t have installed it, download the JDK and install it. Set path of the jdk/bin directory. Create the Java program Compile and run the Java program 2. The Java . . . Read more