{"id":68750,"date":"2020-10-30T13:06:41","date_gmt":"2020-10-30T13:06:41","guid":{"rendered":"https:\/\/www.fita.in\/?p=68750"},"modified":"2023-10-09T12:44:57","modified_gmt":"2023-10-09T12:44:57","slug":"string-arrays-in-java","status":"publish","type":"post","link":"https:\/\/www.fita.in\/string-arrays-in-java\/","title":{"rendered":"String Arrays In Java"},"content":{"rendered":" \r\n
<\/div>\r\nIn this blog, we will dive deep into understanding string arrays in java with this table of content…\r\n
\r\n
<\/i> String Arrays in Java<\/div>\r\n
<\/i> Declaring A String Array In Java<\/div>\r\n
<\/i> Initializing String Array In Java<\/div>\r\n
<\/i> Size Of A String Array<\/div>\r\n
<\/i> Iterating In A String Array<\/div>\r\n
<\/i> Searching Through A String Array<\/div>\r\n
<\/i> Sorting A String Array<\/div>\r\n
<\/i> Converting String Array To A String<\/div>\r\n
<\/i> Converting String Array To A List<\/div>\r\n
<\/i> Converting String Array To A Set<\/div>\r\n
<\/i> Converting List To A String Array<\/div>\r\n<\/div>\r\nSo let us start with understanding What are String Arrays In Java.<\/em>\r\n

String Arrays in Java<\/strong><\/h3>\r\n

We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays. They are character arrays and immutable, that is their size cannot be changed once defined. The characters are stored at contiguous memory locations just like arrays. Different operations such as searching for a character, sorting the string, splitting the string, or converting a string array as string iterating through characters, etc, can be performed on string arrays.<\/p>\r\n

The main method public static void main(String[] args) <\/em>\u00a0of core java takes string arrays as arguments.<\/p>\r\nLet us see how to implement string arrays<\/em> in java. Make sure you have java installed for implementation.\r\n

Declaring String Array in Java<\/strong><\/h3>\r\nString array can be declared in 2 ways,\r\n
\r\n
<\/i> By mentioning the size of the string array<\/div>\r\n
<\/i> Without mentioning the size of the string array<\/div>\r\n<\/div>\r\n
\r\n
\/\/ example program for declaring string Arrays in Java\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr_1; \/\/ declaring without size\r\n\r\nString[] strArr_2 = new String[2]; \/\/ declaring with size\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\n

If you print the array elements, you will get a null value for the size number of times, which is once for the first string array and twice for the second string array.<\/p>\r\n

After learning how to declare String Arrays<\/em> in Java, let us now learn how to Initialise String Arrays<\/em> in Java.<\/p>\r\n\r\n

Initialising String Array in Java<\/strong><\/h3>\r\nA string array can be initialised in 2ways;\r\n
\r\n
<\/i> Inline string initialisation<\/div>\r\n
<\/i> Initialisation after declaration<\/div>\r\n<\/div>\r\nExample program for string array initialisation\r\n
\r\n
\/\/ example program for initialising string arrays in java\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\n\/\/ inline initialization\r\n\r\nString[] strArr_1 = new String[] { \"A\", \"E\", \"I\", \"O\", \"U\" };\r\n\r\nString[] strArr_2 = { \"A\", \"E\", \"I\", \"O\", \"U\" };\r\n\r\n \r\n\r\n\/\/ initialization after declaration\r\n\r\nString[] strArr_4 = new String[5];\r\n\r\nstrArr_4[0] = \"A\";\r\n\r\nstrArr_4[1] = \"E\";\r\n\r\nstrArr_4[2] = \"I\";\r\n\r\nstrArr_4[3] = \"O\";\r\n\r\nstrArr_4[4] = \"U\";\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to initialise String Arrays<\/em> in Java, let us now learn how to access String Arrays<\/em> in Java.\r\n

Accessing characters from the string array<\/strong><\/h3>\r\n

Just like elements can be accessed from an array using an index, characters can also be accessed with the index or position of the character in the string array.<\/p>\r\n

Here is an example program for accessing characters from a string array<\/p>\r\n\r\n

\r\n
\/\/ example program for accessing characters from the string array\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\n\/\/ inline initialization\r\n\r\nString[] strArr_1 = new String[] { \"A\", \"E\", \"I\", \"O\", \"U\" };\r\n\r\nString[] strArr_2 = { \"A\", \"E\", \"I\", \"O\", \"U\" };\r\n\r\nSystem.out.println(strArr_1[0]); \/\/ first char from strArr_1\r\n\r\nSystem.out.println(strArr_2[3]); \/\/ fourth char from strArr_2\r\n\r\nSystem.out.println(strArr_1[4]);\/\/ last char from strArr_1\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\n\r\n<\/em><\/strong>Output for the above program\r\n
\r\n
\r\nA\r\n\r\nO\r\n\r\nU<\/code><\/pre>\r\n<\/div>\r\n

Here the strArr[0] is the first element in the array and strArr[4] is the last element in the array, which is also one less than the size of the array because the indexing starts at zero.<\/p>\r\n

If you try to access strArr[5] or at any other index which is not present in the string array, it will throw at you an exception error of java.lang.ArrayIndexOutOfBoundsException<\/em><\/p>\r\n

Check out this Complete Java Online Course<\/a> by FITA Academy<\/a>. FITA provides a complete Java course including core java and advanced java J2EE, and SOA training, where you will be building real-time applications using Servlets, Hibernate Framework,<\/em> and Spring <\/em>with Aspect Oriented Programming (AOP) architecture, Struts through JDBC<\/em> bundled with, placement support, and certification at an affordable price with an active placement cell,by expert software developers with over 10 years of experience in the field to make you an industry required certified java developer.<\/p>\r\nAfter learning how to access String Arrays<\/em> in Java, let us now learn how to <\/em>find the size of String Arrays<\/em> in Java.\r\n

Size of String Array<\/strong><\/h3>\r\n

The size of the string array is the number of elements or characters in the array, irrespective of the index of the last element. Well, the size or the length of an array or string array can be found using the length variable in java. For Example<\/p>\r\n\r\n

\r\n
\/\/ example program for finding the size of the string Array\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\n\/\/ Initializing string arrays\r\n\r\nString[] strArr_1 = new String[] { \"A\", \"E\", \"I\", \"O\", \"U\" };\r\n\r\nString[] strArr_2 = { \"F\",\"I\",\"T\",\"A\"};\r\n\r\n \r\n\r\n\/\/ printing length of the string using length variable\r\n\r\nSystem.out.println(strArr_1.length);\r\n\r\nSystem.out.println(strArr_2.length);\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
5\r\n\r\n4<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to find the size of the String Arrays<\/em> in Java, let us now learn how to traverse through String Array<\/em> in Java.\r\n

Traversing String Array<\/strong><\/h3>\r\nWe can iterate through the string array and get each element at a time using a for loop, or for each loop.\r\n
\r\n
<\/i> Using for loop<\/div>\r\n<\/div>\r\n
\r\n
\/\/ example program for traversing through the string Array using for loop\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strarr_1 = { \"F\", \"I\", \"T\", \"A\" };\r\n\r\nString[] strarr_2 = { \"FITA\", \"Academy\" };\r\n\r\n \r\n\r\n\/\/iterating through all the characters in the array using for loop\r\n\r\nfor (int i = 0; i < strarr_1.length; i++) {\r\n\r\nSystem.out.println(strarr_1[i]);\r\n\r\n}\r\n\r\nSystem.out.println();\r\n\r\nfor (int i = 0; i < strarr_2.length; i++) {\r\n\r\nSystem.out.print(strarr_2[i]+\" \");\r\n\r\n}\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
\r\nF\r\n\r\nI\r\n\r\nT\r\n\r\nA\r\n\r\n \r\n\r\nFITA Academy<\/code><\/pre>\r\n<\/div>\r\n
\r\n
<\/i> Using the for-each loop<\/div>\r\n<\/div>\r\n
\r\n
\/\/ example program for finding the size of the string Array using for each loop\r\n\r\nimport java.util.*;\r\n\r\nclass Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr_1 = { \"F\", \"I\", \"T\", \"A\" };\r\n\r\nString[] strArr_2 =new String[] { \"FITA\", \"Academy\" };\r\n\r\n \r\n\r\n\/\/ iterating through all the characters in the array using foreach\r\n\r\nfor (String str : strArr_1) {\r\n\r\nSystem.out.print(str+\" \");\r\n\r\n}\r\n\r\nSystem.out.println();\r\n\r\nfor (String str : strArr_2) {\r\n\r\nSystem.out.print(str+\" \");\r\n\r\n}\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
F I T A\r\n\r\nFITA Academy<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to traverse through String Arrays<\/em> in Java, let us now learn how to search for a value from String Array<\/em> in Java.\r\n

Searching for a value in String Array<\/strong><\/h3>\r\n

We can search for a value in a string by looping over each element and comparing it with the value, this method will return the index of the first found match in the array, For example,<\/p>\r\n\r\n

\r\n
\/\/ example program for searching for a value from the string Array\r\n\r\nimport java.util.*;\r\n\r\n \r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\", \"A\", \"a\", \"c\", \"a\", \"d\", \"emy\" };\r\n\r\nScanner scn = new Scanner(System.in);\r\n\r\nboolean found = false;\r\n\r\nint index = 0;\r\n\r\nSystem.out.print(\"Find the index of \");\r\n\r\nString str = scn.nextLine();\r\n\r\nlen = strArr.length\r\n\r\nint pos = 0;\r\n\r\nfor (int pos; len> pos; pos++) {\r\n\r\nif (str.equals(strArr[pos])) {\r\n\r\nindex = pos;\r\n\r\nfound = true;\r\n\r\nbreak;\r\n\r\n}\r\n\r\n}\r\n\r\nif (found)\r\n\r\nSystem.out.print( \" found\u201d+str + in the string array at the index:\"+ index);\r\n\r\nelse\r\n\r\nSystem.out.print(\"Could not find \" + str + \"in the string array, str\");\r\n\r\nscn.close();\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
Find the index of A\r\n\r\nA found at the index: 3\r\n\r\n \r\n\r\nFind the index of a\r\n\r\na found at the index: 4<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to search for a value from the\u00a0 String Arrays<\/em> in Java, let us now learn how to convert String Array to a String<\/em> in Java.\r\n

Converting string array to a string<\/strong><\/h3>\r\nThe toString() method can be used on arrays to convert string array to string.\r\n\r\nHere is an example program\r\n
\r\n
\/\/ example program for converting string Array to a string using toString method\r\n\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\", \"A\", \"a\", \"c\", \"a\", \"d\", \"emy\" };\r\n\r\nString theString = Arrays.toString(strArr);\r\n\r\nSystem.out.println(theString);\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
[F, I, T, A, a, c, a, d, emy]<\/code><\/pre>\r\n<\/div>\r\nor using the StringBuilder class, we can pass a custom delimiter, For instance,\r\n
\r\n
\/\/ example program for converting string Array to a string using StringBuilder class\r\n\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\", \"A\", \"a\", \"c\", \"a\", \"d\", \"emy\" };\r\n\r\nString delimiter = \" \";\r\n\r\nStringBuilder sb = new StringBuilder();\r\n\r\nfor (String ch : strArr) {\r\n\r\nif (sb.length() > 0) {\r\n\r\nsb.append(delimiter);\r\n\r\n}\r\n\r\nsb.append(ch);\r\n\r\n}\r\n\r\nString theString = sb.toString();\r\n\r\nSystem.out.println(theString);\r\n\r\n \r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
F I T A a c a d emy<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to convert String Array to a String <\/em>in Java, let us now learn how to sort a String Array<\/em> in Java.\r\n

Sorting an array<\/strong><\/h3>\r\nWe can arrange the string array alphabetically using the sort() method on the array.\r\n
\r\n
\/\/ example program for sorting the string Array\r\n\r\nimport java.util.*;\r\n\r\n \r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\", \"A\", \"a\", \"c\", \"a\", \"d\", \"emy\" };\r\n\r\nSystem.out.println(\"Initial string array: \" + Arrays.toString(strArr));\r\n\r\nArrays.sort(strArr);\r\n\r\nSystem.out.println(\"sorted string array: \" + Arrays.toString(strArr));\r\n\r\n \r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
\r\nInitial string array: [F, I, T, A, a, c, a, d, emy]\r\n\r\nstring array after sorting: [A, F, I, T, a, a, c, d, emy]<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to sort a String Array <\/em>in Java, let us now learn how to convert a String Array to a List<\/em> in Java.\r\n

Converting A String Array To A List<\/strong><\/h3>\r\nUnlike arrays, a list is mutable, and its size can be changed. We can change the array to list using the asList() method.\r\n\r\nHere is an example for converting a string to list\r\n
\r\n
\r\n\/\/ example program for converting string arrays to a list using asList method\r\n\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\",\"A\" };\r\n\r\nList<String> strLst = Arrays.asList(strArr);\r\n\r\nSystem.out.print(strLst); \/\/ outputs [F,I,T,A]\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nNow to add more elements to the list, we will need to convert string array to an array list using ArrayList.Here\u2019s how you would add elements to list,\r\n
\r\n
\r\n\/\/ example program for finding the size of the string Array using ArrayList\r\n\r\nimport java.util.*;\r\n\r\n \r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\",\"A\" };\r\n\r\nList<String> fxdLst = Arrays.asList(strArr);\r\n\r\nList<String> strLst = new ArrayList<String>(fxdLst);\r\n\r\nstrLst.add(\"Academy\");\r\n\r\nSystem.out.print(strLst);\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
[F, I, T, A, Academy]<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to convert String Array to a List <\/em>in Java, let us now learn how to convert a String Array to a set<\/em> in Java.\r\n

Converting String Array To A Set<\/strong><\/h3>\r\nA set is a data structure and an unordered collection of elements just like an array or list, except that it cannot contain duplicate elements. Let\u2019s convert our previous array to a set using the HashSet class.\r\n\r\nExample program to demonstrate string set\r\n
\r\n
\r\n\/\/ example program for converting string Array to a set\r\n\r\nimport java.util.*;\r\n\r\n \r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\nString[] strArr = { \"F\", \"I\", \"T\", \"A\",\"a\",\"c\",\"a\",\"d\",\"emy\" };\r\n\r\nList<String> strLst = Arrays.asList(strArr);\r\n\r\nSet<String> strSt = new HashSet<String>(strLst);\r\n\r\nSystem.out.println(\"Size of list: \" + strLst.size());\r\n\r\nSystem.out.println(\"Size of the set is: \" + strSt.size());\r\n\r\nSystem.out.print(strSt);\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
The size of the original list is: 9\r\n\r\nThe size of the set is: 8\r\n\r\n[emy, A, a, c, T, d, F, I]<\/code><\/pre>\r\n<\/div>\r\nAfter learning how to convert String Array to a set <\/em>in Java, let us now learn how to convert List to a String Array<\/em> in Java.\r\n

Converting List To A String Array<\/strong><\/h3>\r\nWe have covered most of the operations on string arrays and now for the final one, we will convert a list to the string using the toArray() method. Here is how with an example,\r\n
\r\n
\/\/ example program for converting List to a String Array\r\n\r\nimport java.util.*;\r\n\r\n \r\n\r\npublic class Main {\r\n\r\npublic static void main(String[] args) {\r\n\r\n\/\/String[] strArr = { \"F\", \"I\", \"T\", \"A\", \"a\", \"c\", \"a\", \"d\", \"emy\" };\r\n\r\nList<String> strLst = new ArrayList<String>();\r\n\r\nstrLst.add(\"F\");\r\n\r\nstrLst.add(\"I\");\r\n\r\nstrLst.add(\"T\");\r\n\r\nstrLst.add(\"A\");\r\n\r\nstrLst.add(\"Academy\");\r\n\r\nString[] strArr = strLst.toArray(new String[] {});\r\n\r\nfor (String ch : strArr) {\r\n\r\nSystem.out.println(ch+\" \");\r\n\r\n}\r\n\r\n}\r\n\r\n}<\/code><\/pre>\r\n<\/div>\r\nOutput for the above program\r\n
\r\n
F\r\n\r\nI\r\n\r\nT\r\n\r\nA\r\n\r\nAcademy<\/code><\/pre>\r\n<\/div>\r\n

There are many more string methods available, and I would recommend you to practice these problems on strings in java.<\/p>\r\n

This was all about strings, arrays, and string arrays in java along with practice programs. To get in-depth knowledge of core Java <\/em>and advanced java, J2EE\u00a0 SOA training <\/em>along with its various applications and real-time projects using Servlets, Spring <\/em>with Aspect-Oriented Programming (<\/em>AOP) <\/em>architecture,<\/em> Hibernate<\/em> Framework, and Struts <\/em>through JDBC <\/em>you can enroll in Certified Java Training in Chennai<\/a> or Certified Java Training in Bangalore<\/a> by FITA <\/a>or a virtual class for this course,at an affordable price, bundled with real-time projects, certification, support, and career guidance assistance and an active placement cell, to make you an industry required certified java developer.<\/p>\r\n

FITA\u2019s courses training is delivered by professional experts who have worked in the software development and testing industry for a minimum of 10+ years, and have experience of working with different software frameworks and software testing designs.<\/p>\r\n\u00a0<\/em><\/strong>","protected":false},"excerpt":{"rendered":"  In this blog, we will dive deep into understanding string arrays in java with this table of content… String Arrays in Java Declaring A String Array In Java Initializing String Array In Java Size Of A String Array Iterating In A String Array Searching Through A String Array Sorting A String Array Converting String […]","protected":false},"author":1,"featured_media":89083,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-68750","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"acf":[],"yoast_head":"\nString Arrays In Java | Java String Arrays | FITA Academy<\/title>\n<meta name=\"description\" content=\"We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fita.in\/string-arrays-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"String Arrays In Java | Java String Arrays | FITA Academy\" \/>\n<meta property=\"og:description\" content=\"We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fita.in\/string-arrays-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"FITA Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fitaAcademy\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-30T13:06:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-09T12:44:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fitaacademy\" \/>\n<meta name=\"twitter:site\" content=\"@fitaacademy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"String Arrays In Java | Java String Arrays | FITA Academy","description":"We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fita.in\/string-arrays-in-java\/","og_locale":"en_US","og_type":"article","og_title":"String Arrays In Java | Java String Arrays | FITA Academy","og_description":"We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays.","og_url":"https:\/\/www.fita.in\/string-arrays-in-java\/","og_site_name":"FITA Academy","article_publisher":"https:\/\/www.facebook.com\/fitaAcademy","article_published_time":"2020-10-30T13:06:41+00:00","article_modified_time":"2023-10-09T12:44:57+00:00","og_image":[{"width":800,"height":400,"url":"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@fitaacademy","twitter_site":"@fitaacademy","twitter_misc":{"Written by":"admin","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#article","isPartOf":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/"},"author":{"name":"admin","@id":"https:\/\/www.fita.in\/#\/schema\/person\/bb54ebe12aae8299727b8582c44347fb"},"headline":"String Arrays In Java","datePublished":"2020-10-30T13:06:41+00:00","dateModified":"2023-10-09T12:44:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/"},"wordCount":1292,"publisher":{"@id":"https:\/\/www.fita.in\/#organization"},"image":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg","articleSection":["Java"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.fita.in\/string-arrays-in-java\/","url":"https:\/\/www.fita.in\/string-arrays-in-java\/","name":"String Arrays In Java | Java String Arrays | FITA Academy","isPartOf":{"@id":"https:\/\/www.fita.in\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#primaryimage"},"image":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg","datePublished":"2020-10-30T13:06:41+00:00","dateModified":"2023-10-09T12:44:57+00:00","description":"We know that arrays in java are lists or collections of elements, strings in java behave similarly to arrays.","breadcrumb":{"@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fita.in\/string-arrays-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#primaryimage","url":"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg","contentUrl":"https:\/\/www.fita.in\/wp-content\/uploads\/2020\/10\/string-array-in-java.jpg","width":800,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.fita.in\/string-arrays-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fita.in\/"},{"@type":"ListItem","position":2,"name":"String Arrays In Java"}]},{"@type":"WebSite","@id":"https:\/\/www.fita.in\/#website","url":"https:\/\/www.fita.in\/","name":"FITA Academy","description":"","publisher":{"@id":"https:\/\/www.fita.in\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fita.in\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.fita.in\/#organization","name":"FITA Academy","url":"https:\/\/www.fita.in\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fita.in\/#\/schema\/logo\/image\/","url":"https:\/\/www.fita.in\/wp-content\/uploads\/2019\/07\/site-logo-2.png","contentUrl":"https:\/\/www.fita.in\/wp-content\/uploads\/2019\/07\/site-logo-2.png","width":206,"height":100,"caption":"FITA Academy"},"image":{"@id":"https:\/\/www.fita.in\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fitaAcademy","https:\/\/x.com\/fitaacademy","https:\/\/www.instagram.com\/fita_Academy\/","https:\/\/www.linkedin.com\/company\/9223636\/admin\/","https:\/\/www.youtube.com\/channel\/UCIbVc86kI5Jnq4Ez_8_hhIg?view_as=subscriber"]},{"@type":"Person","@id":"https:\/\/www.fita.in\/#\/schema\/person\/bb54ebe12aae8299727b8582c44347fb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1eb033f2b18b94065fabbcf6c8d8766b4ce3e554fea0cd7e183a04d46a52a42c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1eb033f2b18b94065fabbcf6c8d8766b4ce3e554fea0cd7e183a04d46a52a42c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1eb033f2b18b94065fabbcf6c8d8766b4ce3e554fea0cd7e183a04d46a52a42c?s=96&d=mm&r=g","caption":"admin"}}]}},"_links":{"self":[{"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/posts\/68750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/comments?post=68750"}],"version-history":[{"count":7,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/posts\/68750\/revisions"}],"predecessor-version":[{"id":94638,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/posts\/68750\/revisions\/94638"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/media\/89083"}],"wp:attachment":[{"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/media?parent=68750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/categories?post=68750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fita.in\/wp-json\/wp\/v2\/tags?post=68750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}