answersLogoWhite

0


Best Answer

Strings and Arrays are two totally different data types in Java and they will not match with one another.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you prove the given string by user is array or not in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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.


Where can one find a tutorial on java string array?

There are many ways to find tutorials on Java string array. You can purchase the digital tutorials at a local computer store. There are also books you can check out at your local library.


What is java string?

array of character data type which is terminated by null character


In java is A string the same thing as a char?

No.A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.No.A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.No.A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.No.A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.


How can you initialize an array in Java?

If you refering to Object then String[] something=new String[2]; Here you have to remember that something only allocated space for 2 String object but it did not created them yet. By default Objects are intantiated to null so if you try to print the content of an array System.out.println(something[0]);//print null System.out.println(something[0].toLowerCase()); Throws NullPointerException Couple other ways to create Arrays In java String[] something=new String[]{"Me","You"}; String[] something={"Me", "You"};


What are benefits of array in java?

array example in java


Write a java program to initialize array of string with the days of the week?

final String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};


How can I write a code in Java that returns the number of names in a given array that end in either ie or y?

int getNumMatches(String[] names) { int numMatches = 0; for(String name:names) { if(name.endsWith("ie") name.endsWith("y")) { ++numMatches; } } return numMatches; }


What is the character string usually called?

I think, array of string type object in java.actually java take any command line argument in stringformat. bydefault


What will happen if a String array is not provided as the argument to the main method in Java EE?

java takes command line arguments from user so as to execute the program,that's why we always mention arguments for main() , now java always assumes that the argumetns are of String type which may be appropriately converted to any other type later. that is why we pass string array to hold the command line argumetns supplied by the user.


What is string args?

String[] args means an array of sequence of characters (Strings) that are passed to the "main" function. This happens when a program is executed. Example when you execute a Java program via the command line: java MyProgram This is just a test. Therefore, the array will store: ["This", "is", "just", "a", "test"] To learn more about data science please visit- Learnbay.co


How do you create string array in java?

String[] myStringArray = { "abc","def","xyz" }; You can access elements of this array by using the [index] operation. Ex: myStringArray[0] will contain value "abc" and myStringArray[1] will contain value "def" and so on...