Fendadis John has Published 98 Articles

Compare two strings lexicographically in Java.

Fendadis John

Fendadis John

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

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

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

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

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

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

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

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

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 typedef declarations in C++?

Fendadis John

Fendadis John

Updated on 11-Feb-2020 07:35:59

The typedef keyword in C++ can be used to give a type a new name. For example, you can give a new name of BYTE to unsigned characters −typedef unsigned char BYTE;After this type definition, the identifier BYTE can be used as an abbreviation for the type unsigned char, for ... Read More

What are primitive data type in C++?

Fendadis John

Fendadis John

Updated on 11-Feb-2020 07:19:29

A primitive type is a data type where the values that it can represent have a very simple nature (a number, a character or a truth-value); the primitive types are the most basic building blocks for any programming language and are the base for more complex data types.C++ has the ... Read More

Advertisements