Skip to content

Commit 97bd8a3

Browse files
inital commit
1 parent f623923 commit 97bd8a3

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

easyq/src/easyq/splitL.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
*
3+
*/
4+
package easyq;
5+
6+
/**
7+
* @author M.NAVEEN
8+
* RANDOM CODER'S
9+
*
10+
*/
11+
public class splitL {
12+
13+
14+
public static void main(String[] args) {
15+
16+
String str="JavaISBALA";
17+
int n=4;
18+
for(int i=0;i<str.length();i=i+n) {
19+
if(i+n<str.length())
20+
System.out.println(str.substring(i, i+n));
21+
else
22+
System.out.println(str.substring(i,str.length()));
23+
}
24+
25+
}
26+
27+
}

0 commit comments

Comments
 (0)