Want to learn java ?? :)
I have uploaded ebook which can enrich ur knowledge with complete reference..
.rar file also contains 10 java prog wch wud be helpful to you :)so what you waiting for ?? :p download it and yes don't forget to hit like and share it :)
Good luck....
Demo:
********************Prog*******************************
class str{
int len;
String str1="My name is Hackrich";
public str(){
len=str1.length();
}
String substr(){
int start=len-10;
int end=len;
char chars[]=new char[end-start];
str1.getChars(start,end,chars,0);
String str2=new String(chars);
return(str2);
}
}
class demo2{
public static void main(String args[]){
str s=new str();
System.out.println("String is:"+s.str1);
System.out.println("Substring formed by last 10 char:"+s.substr());
}
}
***********************Output**************************
String is:My name is Hackrich
Substring formed by last 10 char: s hackrich
******************************************************
► Download it ◄
► Password : HACKRICH.BLOGSPOT.COM
Share it :) ♥
0 comments:
Post a Comment
Share our post if you like it..