answersLogoWhite

0

The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the code required to convert an integer variable to a string variable in Java?

There are several different methods to convert an integer variable to a string variable in Java. For example, one can use the following code to convert an integer variable to a string variable: Integer.toString(number)


Explain three different methods in java?

There are three different methods /functions in java are there : 1)computational methods.2)manipulative methods.3)procedural methods.


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


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.


All types of String Functions in java?

Type the text String in your favorite IDE, and press F1 for help. You should get a list of all the methods available for the String class. Also check the StringBuffer class, which has some additional methods - for example, the capability of reversing a string. If you can't get the help this way, search the online Java documentation for String and StringBuffer. Here is the documentation of the Stringclass: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html


What is a function in java?

The term equivalent to functions in Java is "methods". Methods are pieces of code that are used to make some functionality. Ex: public String getName(){ return "Anand"; } The above is a sample method


Java program convert the inputed words into its upper case or lower case form?

There are methods in the String class; toUppercase() and toLowerCase(). i.e. String input = "Hello!"; String upper = input.toUpperCase(); //stores "HELLO!" String lower = input.toLowerCase(); //stores "hello!" -Note: these methods are NOT modifier methods therefore the original string is still "Hello!"


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.


Attributes and methods of uppercase in java?

In Java toUppercase() is a method of the class String: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toUpperCase()


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.


How can you write an interface name M and In the interface M place 2 methods named taste and smell both return String type in java program?

interface M { String taste(); String smell(); }