Anjana has Published 50 Articles

Replace String with another in java.

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

416 Views

The replace() method of the returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.Example Live Demoimport java.io.*; public class Test {    public static void main(String args[]) {       String Str = new String("Welcome to Tutorialspoint.com");       System.out.print("Return Value :" ); ... Read More

Checking for Null or Empty or White Space Only String in Java.

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

2K+ Views

We can verify whether the given string is empty using the isEmpty() method of the String class. This method returns true only if length() is 0.Example Live Demoimport java.lang.*; public class StringDemo {    public static void main(String[] args) {       String str = "tutorialspoint";       // prints ... Read More

Methods of StringBuilder class in Java.

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

287 Views

Following are the various constructors provided by the StringBuilder class.S.N.Constructor & Description1StringBuilder()This constructs a string builder with no characters in it and an initial capacity of 16 characters.2StringBuilder(CharSequence seq)This constructs a string builder that contains the same characters as the specified CharSequence.3StringBuilder(int capacity)This constructs a string builder with no characters ... Read More

How to convert String to Integer and Integer to String in Java?

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

3K+ Views

Java lang package provides Integer class which has methods to convert integer to String and vice versa. You can convert a String to an integer using the parseInt() method and Integer to String using the toString() method.Example Live Demopublic class Sample {    public static void main(String args[]) {       String ... Read More

Constructors of StringTokenizer class in Java.

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

248 Views

Following are the important constructors of the StringTokenizer class.Sr.No.Constructor & Description1StringTokenizer(String str)This constructor a string tokenizer for the specified string.2StringTokenizer(String str, String delim)This constructor constructs string tokenizer for the specified string.3StringTokenizer(String str, String delim, boolean returnDelims)This constructor constructs a string tokenizer for the specified string. Read More

What is JAVA_HOME variable in Java Environment?

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

473 Views

JAVA_HOME refers to jdk/bin directory. It is used by a java based application.

How to set Java Path in Mac OS?

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

1K+ Views

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH' Read More

Is StringBuffer final in Java?

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

714 Views

Yes, StringBuffer class is final Java. We cannot override this class.

What is the role of C++ in Computer Science?

Anjana

Anjana

Updated on 30-Jul-2019 22:30:21

246 Views

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ ... Read More

Changing Data Element of a column and showing description in Transaction SE16N

Anjana

Anjana

Updated on 30-Jul-2019 22:30:20

432 Views

You probably need to activate the change. Other option is by deleting the description and enter the wrong character in data element name.This will make the system show an error message since that element does not exist.Correct the DDIC element spelling. The system now considers this a big enough change ... Read More

Advertisements