Karthikeya Boyini has Published 2193 Articles

Java Program to convert ASCII code to String

karthikeya Boyini

karthikeya Boyini

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

18K+ 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

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

357 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

How to draw a polyline in HTML5 SVG?

karthikeya Boyini

karthikeya Boyini

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

2K+ 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

53K+ 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

EOF, getc() and feof() in C

karthikeya Boyini

karthikeya Boyini

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

27K+ 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

26K+ 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

Split String with Comma (,) in Java

karthikeya Boyini

karthikeya Boyini

Updated on 13-Sep-2023 15:45:12

34K+ Views

Let’s say the following is our string.String str = " This is demo text, and demo line!";To split a string with comma, use the split() method in Java.str.split("[, ]", 0);The following is the complete example.Example Live Demopublic class Demo {     public static void main(String[] args) {        String str = "This is demo text, and demo line!";   ... Read More

C# Program to check if a number is prime or not

karthikeya Boyini

karthikeya Boyini

Updated on 10-Sep-2023 08:06:41

63K+ Views

To calculate whether a number is prime or not, we have used a for loop. Within that on every iteration, we use an if statement to find that the remainder is equal to 0, between the number itself.for (int i = 1; i

Check whether a character is Uppercase or not in Java

karthikeya Boyini

karthikeya Boyini

Updated on 06-Sep-2023 21:10:01

49K+ Views

To check whether a character is in Uppercase or not in Java, use the Character.isUpperCase() method.We have a character to be checked.char val = 'K';Now let us use the Character.isUpperCase() method.if (Character.isUpperCase(val)) {    System.out.println("Character is in Uppercase!"); }else {    System.out.println("Character is in Lowercase!"); }Let us see the complete ... Read More

How to initialize a list to an empty list in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 06-Sep-2023 20:56:09

48K+ Views

To initialize a list to an empty list in C#, set it like the following statement without any elements −List list = new List();Now, use the Any() method to check whether the list is empty or not −bool chk = !list.Any();Let us see the complete code −Example Live Demousing System; using ... Read More

Previous 1 ... 5 6 7 8 9 ... 220 Next
Advertisements