answersLogoWhite

0


Best Answer

The toUpperCase() method returns the uppercase equivalent of a string.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What method returns the uppercase equivalent of a string?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to convert lowercase to uppercase in java?

In Java you can invoke the toUpperCase()method on a string to convert it to a new string with all upper case characters.For example, "abc".toUpperCase() returns "ABC"Likewise, the static Character.toUpperCase(char ch) method takes a single character and returns the upper-case equivalent of that character (e.g. 'a' -> 'A').


Java program to convert lowercase to uppercase?

You can use the toUpperCase() method on a String to convert any String to all uppercase.


How do you separate a word using a string method?

The string class has a split() method which takes a regex pattern and splits the string and returns an array.


What is the constant string length method?

To get the length of the string we use length property. The length property returns the length of a string (number of characters we use).If the string is empty, length of the string will be 0. Syntax: string.length Hope this helps.


The substring method returns?

"[Substr] returns a string object with its contents initialized to a substring of the current object."


Write a method header for a method named find that takes a String and a double as parameters and returns an integer?

int find(String str, double d);


What is getter method?

Getter method is A getter method have its name start with 'get', and take 0 parameters, and returns a value. example :public class Login { public String lmail; public String getLmail() { return lmail; }


What method that returns string representation of the contents of the variable?

Since the question is in the Java category: in Java, the method is called toString(). This method will automatically be invoked if you implicitly convert an object to String type, for example: "The answer is: " + myObject In this example, the String concatenation (the plus sign) forces the object, myObject, to type String - to do this, the object's toString() method will be called.


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.


How do you use indexOf in java?

indexOf is a method of the String class. Since the indexOf method is overloaded, I will be using the indexOf(String str) version in this example. According to the API Documentation, this method "Returns the index within this string of the first occurrence of the specified substring." So, if you wanted to find the position of the letter 'v' in the String 'Java' and print it out, you would do this: String str = "Java"; int i = str.indexOf("v"); System.out.println(i); If the character you passed in the indexOf method does not exist in the String, indexOf would return a -1 (negative one).


How do you uppercase letters in palindrome string?

Use toupper from ctype.h for every letter. Obviously, it doesn't matter if the string is palindrom or not.


How to Uppercase the all vowels in Java?

Assuming that you want to uppercase only the vowels in a String, you can write a loop to go through all the chracters in a String and when a character is a vowel you can convert it to uppercase. I think one way to do this is as follows:String originalString = "aobxkijejku";StringBuffer buffer = newStringBuffer(originalString);for(int i = 0, len = originalString.length(); i < len; i++){if(buffer.charAt(i) 'u'){buffer.setCharAt(i, 'U');}}String modifiedString = buffer.toString();