Nalaka Gamage

Greenhorn
+ Follow
since Nov 15, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nalaka Gamage

public class Test1 {
public static void main(String[] args) {
String aa = "1;2;3;;;4;;;";
String bb = aa.replace(';',',');
String[] cc = bb.split(";");
java.util.List dd = Arrays.asList(cc);
System.out.println(dd);
}
}

Output:[1,2,3,,,4,,,]

Regards,
Nalaka
http://javatouch.googlepages.com
15 years ago
yes its same. Constructor is when you initiate objects. Methods can be called any time.

Regards,
Nalaka
http://javatouch.googlepages.com
15 years ago
Learning java is very easy. Java has much user friendly community than .Net.
Sun's Java tutorial ( http://java.sun.com/docs/books/tutorial/reallybigindex.html )is the best starting point. you better get familiar with NetBeans or Eclipse IDE.
Regards,
Nalaka
http://javatouch.googlepages.com
15 years ago
Hi All,

I am using Maven 1.0.
I there a way to check if the value of a variable is numeric in Maven?
If not is it possible to use Ant call (if any) ?
Quick response is highly appreciated.
Regards,

Nalaka
15 years ago
class a
{
public int i;
}

Yes this violate encapsulation. You must make your member variables private and only use public accessor method to access them. Encapsulated version of the class should be as follows;


class a
{
private int i;
public int getI(){
return i;
}
public void setI(int i){
this.i = i;
}
}

Cheers,
JavaTouch
http://javatouch.googlepages.com
15 years ago