{"id":1743,"date":"2022-04-23T13:07:56","date_gmt":"2022-04-23T07:37:56","guid":{"rendered":"https:\/\/www.digitalclassworld.com\/blog\/?p=1743"},"modified":"2022-04-23T13:08:08","modified_gmt":"2022-04-23T07:38:08","slug":"string-reverse-program-in-java","status":"publish","type":"post","link":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/","title":{"rendered":"Make your program more efficient, using string reverse in java."},"content":{"rendered":"\n<p>A string is a sequence of characters that behave as an object in Java. The string is one of the very common and used data structures after arrays. It&#8217;s an object that stores the data in a character array.<\/p>\n\n\n\n<p>To elaborate, just consider a string as a character array wherein you can solve many string-based problems.<\/p>\n\n\n\n<p>To make a string object, you need the java language, String class. Java programming uses UTF -16 to show a string. Strings are immutable therefore their internal state remains constant after the object is entirely made. The string object performs many operations, but the string reverse in Java is the most widely used function.<\/p>\n\n\n\n<p>For this, various methods are used such as manual, inbuilt functions, and some useful classes that operate on the String objects.<\/p>\n\n\n\n<p>Example of String Reverse Program in Java<\/p>\n\n\n\n<p>For eg. HELLO string reverse and give the output as OLLEH<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Different Ways to Reverse a String<\/h2>\n\n\n\n<p>Since the strings are immutable objects, you need to make another string to reverse them. The string class doesn&#8217;t have a reverse method to reverse the string. It has a to CharArray() method to do the reverse.<\/p>\n\n\n\n<p>Here below are some ways to reverse a string as follows;<\/p>\n\n\n\n<p><strong>By Using toCharArray()<\/strong><\/p>\n\n\n\n<p>The code given below would help to understand how to reverse a string. The toCharArray() method is an approach to reverse a string in Java.<\/p>\n\n\n\n<p>The code also uses the length, which provides the total length of the string variable.<\/p>\n\n\n\n<p>The for loop iterates until the end of the string index is zero.<\/p>\n\n\n\n<p>Code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ReverseString using CharacterArray.\r\n\r\npublic static void main(String&#91;] arg) {\r\n\r\n\/\/ declaring variable\r\n\r\nString stringinput = \"Independent\";\r\n\r\n        \/\/ convert String to character array\r\n\r\n        \/\/ by using toCharArray\r\n\r\n        char&#91;] resultarray = stringinput.toCharArray();\r\n\r\n        \/\/iteration\r\n\r\n        for (int i = resultarray.length - 1; i >= 0; i--)\r\n\r\n         \/\/ print reversed String\r\n\r\n            System.out.print(resultarray&#91;i]);}\r<\/code><\/pre>\n\n\n\n<p><strong>By using the Static method<\/strong><\/p>\n\n\n\n<p>This method consists of the logic to reverse the string.<\/p>\n\n\n\n<p>Make the object for the class Reverse of a String and call the static method with the object as rev. reverse(str)) bypassing the given string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\r\nclass ReverseofaString\r\n{public static void main(String&#91;] arg)\r\n{ReverseofaString rev=new ReverseofaString();\r\nScanner sc=new Scanner(System.in);\r\nSystem.out.print(\"Enter a string : \");\r\nString  str=sc.nextLine();\t\r\nSystem.out.println(\"Reverse of a String  is : \"+rev.reverse(str));}\r\nstatic String reverse(String s)\r\n{String rev=\"\";for(int j=s.length();j>0;--j)\r\n\t{\r\n\trev=rev+(s.charAt(j-1)); \r\n\t}\r\n\treturn rev;\r\n\t}\r\n}\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Using Recursion<\/h2>\n\n\n\n<p>A method is also called recursive. In this program reverse(String s) is completely recursive.<\/p>\n\n\n\n<p>Make the object for the class ReverseofaString rev. Read the string entered using sc.nextLine() and save it in the string variable str. Call the reverse method as rev. reverse(str).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\r\nclass ReverseofaString\r\n{\r\n\tString reverse(String s)\r\n\t{\r\n\t if(s.length() == 0)\r\n     \t return \" \";\r\n  \t return s.charAt(s.length()-1) + reverse(s.substring(0,s.length()-1));\r\n\t}\r\n\tpublic static void main(String&#91; ] arg)\r\n\t{\r\n\tReverseofaString rev=new ReverseofaString();\r\n\tScanner sc=new Scanner(System.in);\r\n\tSystem.out.print(\"Enter a string : \");\r\n\tString  str=sc.nextLine();\t\r\n\tSystem.out.println(\"Reverse of a String  :\"+rev.reverse(str));\r\n\t}\t\r\n}\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Using While Loop<\/h2>\n\n\n\n<p>Here i=length of the given string. The loop iterates until the condition i>0 is false, which means if the length of the string is zero then the cursor terminates the loop.<\/p>\n\n\n\n<p>The loop prints the character of the string which is at the index (i-1) until i>0. Then we would get the reverse of a string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\r\nclass Reverse\r\n{\r\n\tpublic static void main(String&#91; ] arg)\r\n\t{\r\n\tString str;\r\n\tScanner scan=new Scanner(System.in);\r\n\tSystem.out.print(\"Enter a string : \");\r\n\tstr=scan.nextLine();\t\r\n\tSystem.out.println(\"Reverse of a String '\"+str+\"' is  :\"); \r\n\tint i=str.length();\r\n\twhile(i>0)\r\n\t{\r\n\tSystem.out.print(str.charAt(i-1)); \r\n\ti--;\r\n\t}\r\n        }\r\n}\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Using For Loop<\/h2>\n\n\n\n<p>For loop iterates from j=length of the string to j>0.<\/p>\n\n\n\n<p>It prints the character of the string that is at the index (i-1), then we will get the reverse of a string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\r\nclass ReverseofaString\r\n{\r\n\tpublic static void main(String&#91; ] arg)\r\n\t{\r\n\tString str;\r\n\tchar ch;\r\n\tScanner sc=new Scanner(System.in);\r\n\tSystem.out.print(\"Enter a string : \");\r\n\tstr=sc.nextLine();\t\r\n\tSystem.out.println(\"Reverse of a String '\"+str+\"' is  :\"); \r\n\tfor(int j=str.length();j>0;--j)\r\n\t{\r\n\tSystem.out.print(str.charAt(j-1)); \r\n\t}\r\n}\r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Using Stringbuilder\/StringBuffer<\/h2>\n\n\n\n<p>Using StringBuilder.reverse() method to reverse a Java string efficiently. Also, it can also use the StringBuffer.reverse() method. To use StringBuilder is preferred as it\u2019s not synchronized and faster than StringBuffer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Main\r\n{\r\n    \/\/ Method to reverse a string in Java using `StringBuilder`\r\n    public static String reverse(String str) {\r\n        return new StringBuilder(str).reverse().toString();\r\n    }\r\n \r\n    public static void main(String&#91;] args)\r\n    {\r\n        String str = \"Techie Delight\";\r\n \r\n        \/\/ Note that string is immutable in Java\r\n        str = reverse(str);\r<\/code><\/pre>\n\n\n\n<p><strong>Read Also<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.digitalclassworld.com\/blog\/xcode-alternatives-for-windows\/\">5 Best Xcode Alternatives For Windows<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A string is a sequence of characters that behave as an object in Java. The&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,18],"tags":[],"class_list":["post-1743","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-e-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Make your program more efficient, using string reverse in java.<\/title>\n<meta name=\"description\" content=\"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.\" \/>\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.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Make your program more efficient, using string reverse in java.\" \/>\n<meta property=\"og:description\" content=\"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Blogs - Digital Class\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/digitalclassin\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/digitalclassin\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-23T07:37:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-23T07:38:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"359\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Digital Class\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@digitalclassin\" \/>\n<meta name=\"twitter:site\" content=\"@DigitalClassIN\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Digital Class\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\"},\"author\":{\"name\":\"Digital Class\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/person\/15c4d31a0f1bc655c5eb62f211220cb7\"},\"headline\":\"Make your program more efficient, using string reverse in java.\",\"datePublished\":\"2022-04-23T07:37:56+00:00\",\"dateModified\":\"2022-04-23T07:38:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\"},\"wordCount\":498,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg\",\"articleSection\":[\"Development\",\"E-Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\",\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\",\"name\":\"Make your program more efficient, using string reverse in java.\",\"isPartOf\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg\",\"datePublished\":\"2022-04-23T07:37:56+00:00\",\"dateModified\":\"2022-04-23T07:38:08+00:00\",\"description\":\"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage\",\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg\",\"contentUrl\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg\",\"width\":640,\"height\":359,\"caption\":\"String reverse program in java\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.digitalclassworld.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Make your program more efficient, using string reverse in java.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#website\",\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/\",\"name\":\"Blogs - Digital Class\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.digitalclassworld.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#organization\",\"name\":\"Digital Class - E-Learning Marketplace\",\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2020\/08\/101064970_115719343488352_8563264425639804928_n.png\",\"contentUrl\":\"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2020\/08\/101064970_115719343488352_8563264425639804928_n.png\",\"width\":512,\"height\":512,\"caption\":\"Digital Class - E-Learning Marketplace\"},\"image\":{\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/digitalclassin\/\",\"https:\/\/x.com\/DigitalClassIN\",\"https:\/\/www.instagram.com\/digitalclassin\/\",\"https:\/\/www.linkedin.com\/company\/digitalclassin\",\"https:\/\/pinterest.com\/digitalclassin\/\",\"https:\/\/www.youtube.com\/digitalclass\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/person\/15c4d31a0f1bc655c5eb62f211220cb7\",\"name\":\"Digital Class\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g\",\"caption\":\"Digital Class\"},\"description\":\"Digital Class app is an E-Learning Marketplace for tutors and students where tutors can create, place and sell their courses with their own brand name and students can buy from the multiple options like discounts, offers, language, ratings and many more.\",\"sameAs\":[\"https:\/\/www.facebook.com\/digitalclassin\",\"https:\/\/instagram.com\/digitalclassin\",\"https:\/\/www.linkedin.com\/company\/digitalclassin\",\"https:\/\/in.pinterest.com\/digitalclassin\/\",\"https:\/\/x.com\/digitalclassin\",\"https:\/\/youtube.com\/digitalclass\"],\"url\":\"https:\/\/www.digitalclassworld.com\/blog\/author\/digitoui_blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Make your program more efficient, using string reverse in java.","description":"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.","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.digitalclassworld.com\/blog\/string-reverse-program-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Make your program more efficient, using string reverse in java.","og_description":"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.","og_url":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/","og_site_name":"Blogs - Digital Class","article_publisher":"https:\/\/www.facebook.com\/digitalclassin\/","article_author":"https:\/\/www.facebook.com\/digitalclassin","article_published_time":"2022-04-23T07:37:56+00:00","article_modified_time":"2022-04-23T07:38:08+00:00","og_image":[{"width":640,"height":359,"url":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg","type":"image\/jpeg"}],"author":"Digital Class","twitter_card":"summary_large_image","twitter_creator":"@digitalclassin","twitter_site":"@DigitalClassIN","twitter_misc":{"Written by":"Digital Class","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#article","isPartOf":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/"},"author":{"name":"Digital Class","@id":"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/person\/15c4d31a0f1bc655c5eb62f211220cb7"},"headline":"Make your program more efficient, using string reverse in java.","datePublished":"2022-04-23T07:37:56+00:00","dateModified":"2022-04-23T07:38:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/"},"wordCount":498,"commentCount":0,"publisher":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg","articleSection":["Development","E-Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/","url":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/","name":"Make your program more efficient, using string reverse in java.","isPartOf":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage"},"image":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg","datePublished":"2022-04-23T07:37:56+00:00","dateModified":"2022-04-23T07:38:08+00:00","description":"For optimizing the programming language, there are different manipulations required in string which are done through string reverse program in Java.","breadcrumb":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#primaryimage","url":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg","contentUrl":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg","width":640,"height":359,"caption":"String reverse program in java"},{"@type":"BreadcrumbList","@id":"https:\/\/www.digitalclassworld.com\/blog\/string-reverse-program-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.digitalclassworld.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Make your program more efficient, using string reverse in java."}]},{"@type":"WebSite","@id":"https:\/\/www.digitalclassworld.com\/blog\/#website","url":"https:\/\/www.digitalclassworld.com\/blog\/","name":"Blogs - Digital Class","description":"","publisher":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.digitalclassworld.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.digitalclassworld.com\/blog\/#organization","name":"Digital Class - E-Learning Marketplace","url":"https:\/\/www.digitalclassworld.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2020\/08\/101064970_115719343488352_8563264425639804928_n.png","contentUrl":"https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2020\/08\/101064970_115719343488352_8563264425639804928_n.png","width":512,"height":512,"caption":"Digital Class - E-Learning Marketplace"},"image":{"@id":"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/digitalclassin\/","https:\/\/x.com\/DigitalClassIN","https:\/\/www.instagram.com\/digitalclassin\/","https:\/\/www.linkedin.com\/company\/digitalclassin","https:\/\/pinterest.com\/digitalclassin\/","https:\/\/www.youtube.com\/digitalclass"]},{"@type":"Person","@id":"https:\/\/www.digitalclassworld.com\/blog\/#\/schema\/person\/15c4d31a0f1bc655c5eb62f211220cb7","name":"Digital Class","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/178dc576bdb7a4051796680aebe21cbd57cf56d1db22fbe8876baad4449a8683?s=96&d=mm&r=g","caption":"Digital Class"},"description":"Digital Class app is an E-Learning Marketplace for tutors and students where tutors can create, place and sell their courses with their own brand name and students can buy from the multiple options like discounts, offers, language, ratings and many more.","sameAs":["https:\/\/www.facebook.com\/digitalclassin","https:\/\/instagram.com\/digitalclassin","https:\/\/www.linkedin.com\/company\/digitalclassin","https:\/\/in.pinterest.com\/digitalclassin\/","https:\/\/x.com\/digitalclassin","https:\/\/youtube.com\/digitalclass"],"url":"https:\/\/www.digitalclassworld.com\/blog\/author\/digitoui_blog\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"landscape":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"portraits":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"thumbnail":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java-150x150.jpg",150,150,true],"medium":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java-300x168.jpg",300,168,true],"large":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"1536x1536":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"2048x2048":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"covernews-slider-full":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"covernews-slider-center":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"covernews-featured":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java.jpg",640,359,false],"covernews-medium":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java-540x340.jpg",540,340,true],"covernews-medium-square":["https:\/\/www.digitalclassworld.com\/blog\/wp-content\/uploads\/2022\/04\/String-reverse-program-in-java-400x250.jpg",400,250,true]},"rttpg_author":{"display_name":"Digital Class","author_link":"https:\/\/www.digitalclassworld.com\/blog\/author\/digitoui_blog\/"},"rttpg_comment":1,"rttpg_category":"<a href=\"https:\/\/www.digitalclassworld.com\/blog\/category\/development\/\" rel=\"category tag\">Development<\/a> <a href=\"https:\/\/www.digitalclassworld.com\/blog\/category\/e-learning\/\" rel=\"category tag\">E-Learning<\/a>","rttpg_excerpt":"A string is a sequence of characters that behave as an object in Java. The...","_links":{"self":[{"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/posts\/1743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/comments?post=1743"}],"version-history":[{"count":3,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/posts\/1743\/revisions"}],"predecessor-version":[{"id":1747,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/posts\/1743\/revisions\/1747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/media\/1746"}],"wp:attachment":[{"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/media?parent=1743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/categories?post=1743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.digitalclassworld.com\/blog\/wp-json\/wp\/v2\/tags?post=1743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}