Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
/* Hello World in Groovy */
//String text ="FROM LIFE OF LOAN:ANA1";
//String text ="FROM LIFE OF LOAN:ANA1 2020 23sd";
//String text=" 2010 PTP FASTPAY 1339.30 040 9" ;
String text = "FROM LIFE OF LOAN: LOAN MODIFIED EFFECTIVE 06/01/2010 PYMT; TERM=367 "
REGEX_TO_ADD_SPACE_AFTER_SPECIAL_CHARACTER = ':'
println(text.replaceAll(REGEX_TO_ADD_SPACE_AFTER_SPECIAL_CHARACTER,'\$0 ').trim())
class Example {
int x = 100;
public int getX() {
this.x = 200;
return x;
}
static void main(String[] args) {
Example ex = new Example();
println(ex.getX());
}
}
class Example {
int x;
public int getX() {
return x;
}
public void setX(int pX) {
x = pX;
}
static void main(String[] args) {
Example ex = new Example();
ex.setX(100);
println(ex.getX());
}
}
class Example {
static def DisplayName() {
println("This is how methods work in groovy");
println("This is an example of a simple method");
}
static void main(String[] args) {
DisplayName();
}
}
class Example {
static def DisplayName() {
println("This is how methods work in groovy");
println("This is an example of a simple method");
}
static void main(String[] args) {
DisplayName();
}
}