Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
some string reverse in java
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { String b=""; int i; System.out.println("Hello, World!"); String a="helloooo wwwwwwworrrrrrrrrld"; StringBuilder input1 = new StringBuilder(); input1.append(a); System.out.println(input1.reverse()); for( i=0;i<a.length()-1;i++) { if(a.charAt(i)==a.charAt(i+1)) {} else { b=b+a.charAt(i);} } b=b+a.charAt(i); System.out.println(b); } }
run
|
edit
|
history
|
help
0
4c
test
bubble sort
// Java Coding Challenge - 09: Find out duplicate numbers using HashSet
4.b
Account JAVA Cpa
Fibonnaci + Prime number combined
Star
2(B)
Day 1