Fendadis John has Published 72 Articles

Compare two strings lexicographically in Java.

Fendadis John

Fendadis John

Updated on 26-Feb-2020 06:41:22

7K+ Views

The compareTo() method of the String class. This method compares two Strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string. This method returnsa ... Read More

How to import java.lang.String class in Java?

Fendadis John

Fendadis John

Updated on 26-Feb-2020 05:48:03

18K+ Views

To import any package in the current class you need to use the import keyword asimport packagename;ExampleLive Demoimport java.lang.String; public class Sample {    public static void main(String args[]) {       String s = new String("Hello");       System.out.println(s);    } }OutputHello

How to redirect URLs with your Hosting Account?

Fendadis John

Fendadis John

Updated on 25-Feb-2020 06:31:24

222 Views

You can easily redirect URLs to the settings under your hosting account. Let’s say you have a blogger blog and you want to redirect it to your website.A redirect automatically sends your visitors to another destination, within the same site or a new URL.Follow the below given steps to redirect ... Read More

Example to understand type of variables in Java

Fendadis John

Fendadis John

Updated on 25-Feb-2020 05:40:16

113 Views

There are three kinds of variables in Java −Local variablesInstance variablesClass/Static variablesLocal VariablesLocal variables are declared in methods, constructors, or blocks.Local variables are created when the method, constructor or block is entered and the variable will  be destroyed once it exits the method, constructor, or block.Access modifiers cannot be used ... Read More

how to convert vector to string array in java

Fendadis John

Fendadis John

Updated on 24-Feb-2020 10:40:14

379 Views

Following program converts a vector into a array of String.Exampleimport java.util.Vector; public class Tester {    public static void main(String[] args) {       Vector data = new Vector();       data.add("A");       data.add("B");       data.add("C");       String[] strObjects = data.toArray(new String[data.size()]); ... Read More

Converting ArrayList to String[] in java

Fendadis John

Fendadis John

Updated on 24-Feb-2020 10:28:51

474 Views

Following program is converting an ArrayList to String[];Exampleimport java.util.ArrayList; import java.util.List; public class Tester {    public static void main(String[] args) {       List names = new ArrayList();       names.add("A");       names.add("B");       names.add("C");       String[] nameArray = names.toArray(new ... Read More

Creating a variable with dynamic variable type in SAP ABAP

Fendadis John

Fendadis John

Updated on 13-Feb-2020 10:12:00

2K+ Views

You can use RTTS related API to create a Standard table like RANGE which has components like 'LOW', 'HIGH', 'EQ' and 'OPTION'data:    rr_data              type ref to data,    rt_range_string      type range of string,    rs_range_string      like line of rt_range_string, ... Read More

What is the difference between literal and constant in C++?

Fendadis John

Fendadis John

Updated on 11-Feb-2020 08:12:28

764 Views

A literal is a value that is expressed as itself. For example, the number 25 or the string "Hello World" are both literals.A constant is a data type that substitutes a literal. Constants are used when a specific, unchanging value is used various times during the program. For example, if ... Read More

What is the top IDE for c++ on Window?

Fendadis John

Fendadis John

Updated on 10-Feb-2020 12:38:12

193 Views

Big projects are difficult to manage on mere text editors. You're likely to be more productive and less frustrated if you use an IDE in such cases. There are various types of IDE's and you should select the right one which fits your needs. Here's a list of best C/C++ ... Read More

How can we split the name string into two parts by using MySQL SUBSTRING_INDEX() function?

Fendadis John

Fendadis John

Updated on 10-Feb-2020 07:22:10

294 Views

To make it understand, we are using the following data from a table named ‘customerdetail’.mysql> Select * from Customerdetail; +----------------------+----------------------+-----------+---------------------+ | Name                 | FName                | Address   | Emailid             ... Read More

Advertisements