answersLogoWhite

0

No. A String is handled as an Object. In many cases you can treat it as primitive (and forget that it is an object), but sometimes the difference is relevant. The class is called String - note that it starts with an uppercase "S".

One case where it is important to know that a String is an object is when comparing strings. You can't simply use the ==operator; instead, you have to use the .equals()method.

No. A String is handled as an Object. In many cases you can treat it as primitive (and forget that it is an object), but sometimes the difference is relevant. The class is called String - note that it starts with an uppercase "S".

One case where it is important to know that a String is an object is when comparing strings. You can't simply use the ==operator; instead, you have to use the .equals()method.

No. A String is handled as an Object. In many cases you can treat it as primitive (and forget that it is an object), but sometimes the difference is relevant. The class is called String - note that it starts with an uppercase "S".

One case where it is important to know that a String is an object is when comparing strings. You can't simply use the ==operator; instead, you have to use the .equals()method.

No. A String is handled as an Object. In many cases you can treat it as primitive (and forget that it is an object), but sometimes the difference is relevant. The class is called String - note that it starts with an uppercase "S".

One case where it is important to know that a String is an object is when comparing strings. You can't simply use the ==operator; instead, you have to use the .equals() method.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is string class features in java?

String class is useful to accept inputs from commands prompt as string arguments


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.


Which built in class in java contains only final methods?

String class


What is string buffer in java?

StringBuffer is java class available in java.lang package which provides mutable String object where String is immutable class. The methods of this class like reverse(), append(),insert() gives facility to insert data of the same object.


How do you campaire Strings in java?

String class in Java has an 'equals' method that can be used to compare strings.


Why is it a bad idea to name your class string?

If you are talking about Java, that will cause confusion with the built-in "String" class. Sure, Java will distinguish "String" (with an uppercase "S") from "string" (which has no uppercase letters), but it can be confusing for the programmer. In various other programming languages, the situation may be similar.


What is the error in exception handling in java with example?

class Demo { public static void main(String s[]) { System.out.println("hello java frm Demo"); } } class Demo1 { public static void main(String s[]) { System.out.println("hello java frm Demo1"); String z={" "}; Demo.main(); } }


What is a string in java?

An object that stores an ordered set of characters (ie. "hello"). The String class represents character strings.


How do you input the number of characters in java?

".length()". The . length method is inherited from the String class.


How can someone convert string to int in Java?

To convert string to int in Java, the easiest way is to simply use the method Integer.parseInt(). For more information how to do this, refer to the integer class documents.


Which of these methods of string class is used to obtain character at specified index?

You don't specify "these methods", but chances are what you're looking for is the charAt method


How many constructors does the StringTokenizer class have?

As of Java 1.6 it has 3: StringTokenizer(String str) StringTokenizer(String str, String delim) StringTokenizer(String str, String delim, boolean returnDelims)