java

How to reverse each word of a string in Java

Java program to reverse each word of a string. We will split the string into words, reverse each word and combine these words to create the final string. We will use StringBuilder to reverse the words.

Read
java

Java program to check if a string is empty or not

Java program to check if a string is empty or not. We can use isEmpty() method to check if a string is empty or not in Java. Also learn how to check if a string is null or empty.

Read
java

Java StringBuffer.reverse() method explanation with examples

Java StringBuffer.reverse() method is used to reverse the content or characters of a StringBuffer object in Java. StringBuffer object is mutable and we can also convert a string variable to StringBuffer and StringBuffer variable to string.

Read
java

Java String.replace() method explanation with example

Java String.replace() method explanation with example. String.replace method can be used to replace all occurrences of a character or sub string with another character or substring in a given string.

Read
c

typedef in C explanation with examples

typedef in C can be used to create an alternate name or alias for an existing datatype. This post will show you how to use typedef with different examples with integer, unsigned integer, structure etc.

Read
c

putchar() method explanation with example

Learn how to use the putchar method with examples. The putchar method is used to write a character to stdout. This method takes a character or integer value as the parameter. It converts the parameter value to unsigned character before writing to stdout.

Read
c

C library function gets() explanation with examples

Learn how to use the gets() library function in C. We will also learn the differences between gets() and scanf(), why gets() is dangerous, and differences between gets() and fgets().

Read
java

Two different ways in Java to find all duplicate string characters

Learn how to find the duplicate characters in a string in Java in two different ways. We will learn how to do that by using two loops and with a single iteration with examples.

Read
javascript

JavaScript program to print the ASCII values from A to Z alphabet

Different ways in JavaScript to print the ASCII values from A to Z or a to z. We will use a for loop, while loop and forEach loops with charCodeAt method to print the ASCII values of the alphabets.

Read
javascript

How to get all Keys of a JavaScript Object

How to get all keys of an object in JavaScript in different ways. We can use Object.keys(), or we can iterate through the keys of an object by using a loop.

Read