Java Programming
C Programming

String In JAVA language?

Top Answer
User Avatar
Wiki User
Answered 2008-10-21 13:22:22

In Java, literal character strings such as "foo" are implemented as instances of the String class. These strings are constant and can not be modified directly. Mutable character strings, or string variables, are implemented as instances of StringBuffer class. It is also possible to work directly with arrays of chars, but String and related classes offer lots of useful methods.

User Avatar

Your Answer


Still Have Questions?

Related Questions

What do you mean by string in java programming?

A "string" in any programming language is a line of text.

How do you create an object for a class?

Unanswerable. Please supply the programming language.JavaString str = new String(); // Class - String, Object - str

Write a program finding length of string?

In Java:...String sampleString = "Hello!"System.out.println("Your string is: " + sampleString + " with a length of " + sampleString.length());...In Java:...String sampleString = "Hello!"System.out.println("Your string is: " + sampleString + " with a length of " + sampleString.length());...In Java:...String sampleString = "Hello!"System.out.println("Your string is: " + sampleString + " with a length of " + sampleString.length());...In Java:...String sampleString = "Hello!"System.out.println("Your string is: " + sampleString + " with a length of " + sampleString.length());...

Why is Javascript referred to as a loosely typed language?

This is because, unlike Java, all variables are declared without a type.var a = 7; // Integervar b = "A string"; // String variableYou might notice a difference between this and Java. Java goes like this:int a = 7; // IntegerString b = "A string"; // StringIf you want more information, try the related link below.

How do you declare a string in java?

To declare a String in java: String a = "hello"; In the above line, we created a String called a, and assigned the value hello to it.

What are some example for string formatting in Java?

There are lots of examples of string formatting in Java. It can be difficult at times. Some of these examples are, but are not limited to; align, string, format, and JAVA.

What Is The Java Enum And What Is It Used For?

The best way I can describe an enum is a class of Java language. Enums look like they are used in code string when writing a website.

What is special about the lang and string packages for the language Java?

The string can never be modified, they are immutabile. If you think a string is modified, it is actually a new creation. It's basically a conversion of other objects.

Is string is a primitive type or not?

If you mean in Java: no, it is a class. However, the Java language has built-in support for this data type, so that in many cases it SEEMS as a primitive. For example, you can create a String object with a command like: String x = "abc"; instead of using the "new" operator. However, internally, Java will do the equivalent of using the "new" operator.

How does one use string to int Java?

String can be converted into int Java: if the string numbers are ABCD, int foo = Integer.parseInt(ABCD). Knowledge of Java is important to understand these conversions.

Is String in java a class or object?

String is a pre-defined class in Java. For example: String s = new String("This is a string"); the variable s is now a String object since it was declared and initialized in the String class.

What does it mean to have a string split in java?

To have a string split in Java means that a string array, containing substrings (can be delimited by elements of a specified string or Unicode character array), is returned.

How do you write a program using function that counts the number of vowels in a string in java language?

Use text-editor notepad++

Is the java is procedural language?

Java is an Object Oriented language not a procedural language

Is java high machine language?

Java is not machine language. Java is considered a high-level language, at least as compared to machine language.

How does the string trim work in Java?

The string trim works in Java by trimming white space from the beginning and end of a string. It cleans up the string and makes makes it neater for the users of the program.

What is pallendrome in java?

palindrome in every language means same. it means on reversing a number or string, if we get the same number or string as the case may be ,then the number or string is called palindrome. eg: 1221,111,252 or LIRIL,MADAM etc .

Does Visual Java plus plus and Java Builder is different from the Java language?

Yes!Visual Java plus plus and Java Builder is different from the Java language?

How do you convert capital string to small in Java?

To convert a String object to lowercase in Java, use the toLowerCase() method. "HELLO".toLowerCase() returns a new String: "hello".

What kind of language java is?

Java is a strict, object-oriented language.

Which is a valid keyword in java?


What is java and java script?

Java is an object oriented language whereas Javascript is object base language.

Why you are preferring java?

java is platform independent language and open source. java is object oriented language.

In computer terms what does the phrase 'java string replace' mean?

When referring to computer terms, the phrase "java string replace" means that a string in the line of code that Java uses, is being replaced, or needs to be replaced.

Why you learn java language?

java language moreover solve the problems witch is encounter in c and c++ that s why we use the java language...