Karthikeya Boyini has Published 2386 Articles

Java Program to convert ASCII code to String

karthikeya Boyini

karthikeya Boyini

Updated on 31-May-2024 15:34:30

14K+ Views

To convert ASCII to string, use the toString() method. Using this method will return the associated character.Let’s say we have the following int value, which works as ASCII for us.int asciiVal = 89;Now, use the toString() method.String str = new Character((char) asciiVal).toString();Example Live Demopublic class Demo {    public static void ... Read More

Java program to count words in a given string

karthikeya Boyini

karthikeya Boyini

Updated on 31-May-2024 12:58:51

12K+ Views

A string is a class in Java that stores a series of characters enclosed within double quotes. Those characters act as String-type objects. The aim of this article is to write Java programs that count words in a given string. Counting words of the given strings can be solved using ... Read More

Java program to find all duplicate characters in a string

karthikeya Boyini

karthikeya Boyini

Updated on 31-May-2024 12:49:52

41K+ Views

The duplicate characters in a string are those that occur more than once. These characters can be found using a nested for loop. An example of this is given as follows − String = Apple In the above string, p is a duplicate character as it occurs more than ... Read More

How to Check Which Apache Modules are Enabled/Loaded in Ubuntu 16.04

karthikeya Boyini

karthikeya Boyini

Updated on 29-Feb-2024 13:55:47

257 Views

Apache is an open supply program on hand without cost. It runs on 67% of all web servers. It is speedy, risk-free, and comfortable. It may be extremely custom-made to satisfy the wants of many one-of-a-kind environments via utilizing extensions and modules.To install apache, use the following commands-$ sudo apt-get ... Read More

Can we overload or override a static method in Java?

karthikeya Boyini

karthikeya Boyini

Updated on 01-Dec-2023 11:49:35

3K+ Views

If a class has multiple functions by the same name but different parameters, it is known as Method Overloading. If a subclass provides a specific implementation of a method that is already provided by its parent class, it is known as Method Overriding. Method overloading increases the readability of the program. ... Read More

How to draw a polyline in HTML5 SVG?

karthikeya Boyini

karthikeya Boyini

Updated on 22-Nov-2023 04:21:13

1K+ Views

SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.To draw a polygon in HTML ... Read More

Conversion of Array To ArrayList in Java

karthikeya Boyini

karthikeya Boyini

Updated on 07-Nov-2023 03:12:20

49K+ Views

We can convert an array to arraylist using following ways.Using Arrays.asList() method - Pass the required array to this method and get a List object and pass it as a parameter to the constructor of the ArrayList class.Collections.addAll() method - Create a new list before using this method and then add array ... Read More

Determining how many digits there are in an integer in C++

karthikeya Boyini

karthikeya Boyini

Updated on 31-Oct-2023 02:43:30

25K+ Views

Here we will see how to check how many digits are there in an integer in C++. At first we will see the traditional rule, then see one short method to find.In the first method, we will reduce the number using dividing it by 10. And count until the number ... Read More

EOF, getc() and feof() in C

karthikeya Boyini

karthikeya Boyini

Updated on 14-Sep-2023 20:45:57

24K+ Views

EOFEOF stands for End of File. The function getc() returns EOF, on success..Here is an example of EOF in C language, Let’s say we have "new.txt" file with the following content.This is demo! This is demo!Now, let us see the example.Example#include int main() {    FILE *f = fopen("new.txt", ... Read More

Read file line by line using C++

karthikeya Boyini

karthikeya Boyini

Updated on 14-Sep-2023 13:43:23

25K+ Views

This is a C++ program to read file line by line.Inputtpoint.txt is having initial content as "Tutorials point."OutputTutorials point.AlgorithmBegin    Create an object newfile against the class fstream.    Call open() method to open a file “tpoint.txt” to perform write operation using object newfile.    If file is open then ... Read More

Advertisements