Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2192 Articles
karthikeya Boyini
7K+ Views
strdup() The function strdup() is used to duplicate a string. It returns a pointer to a null-terminated byte string. Syntax Here is the syntax of strdup() in C language, char *strdup(const char *string); Example Here is an example of strdup() in C language. #include #include int main() { char ... Read More
karthikeya Boyini
10K+ Views
Enumeration is a user defined datatype in C/C++ language. It is used to assign names to the integral constants which makes a program easy to read and maintain. The keyword “enum” is used to declare an enumeration. The following is the syntax of enums. Syntax enum enum_name{const1, const2, ....... }; ... Read More
karthikeya Boyini
2K+ Views
In this article, we will learn how to convert a LocalDateTime object to a java.util.Date object in Java. The conversion is essential when working with modern and legacy date/time APIs, ensuring compatibility between them. LocalDateTime Class The java.time.LocalDateTime class represents a specific date and time without including any ... Read More
karthikeya Boyini
3K+ Views
In this article, we will learn to replace all occurrences of a given character in a string in Java. Replace() method The replace() method in Java is used to replace all occurrences of a given character in a string with another character. In this example, we will replace all occurrences ... Read More
karthikeya Boyini
604 Views
In this article, we will learn how to use a LinkedHashSet in Java to add and remove elements while maintaining the insertion order. You will see how elements are stored, removed, and updated in a LinkedHashSet without altering the sequence in which they were added. Problem Statement Write a Java ... Read More
karthikeya Boyini
367 Views
In this article, we use the System.nanoTime() method in Java to get the current value of the system timer in nanoseconds. It returns the current value of the most precise available system timer, in nanoseconds. Problem StatementGiven that you need to get the current value of the system timer ... Read More
karthikeya Boyini
422 Views
In this article, we will learn how to check if a String is empty in Java. The isEmpty() method is used to check whether a given string does not contain characters. Problem StatementGiven a string, write a Java program to determine if the string is empty.Input String str ... Read More
karthikeya Boyini
212 Views
In this article, we will learn to use Java to make a file read-only and check if it can still be written. A file can be set to read-only by using the method java.io.File.setReadOnly(). This method requires no parameters and returns true if the file is set to read-only and ... Read More
karthikeya Boyini
170 Views
In this article, we will explore how to verify whether or not a given character is an uppercase letter and, more specifically, falls within the range of A to Z. This is useful when a user’s input consists of some uppercase letter or when a program needs to restrict itself to ... Read More
karthikeya Boyini
865 Views
This article will teach us to convert a string into a numeric primitive type using Integer.valueOf() in Java. By the end, you’ll see how this method takes a string of numbers and transforms it into an integer type, making it usable for arithmetic operations or any other number-based logic. Problem ... Read More