Advertisements
Author Archives: akjava2all
Call by value Vs Call by Reference
Call by value Vs Call by Reference: Call by value: public class CallBy_Value { public static void main(String[] args) { Value v = new Value(10,20); System.out.println(“a and b before call…………”); System.out.println(“a = “+v.a); System.out.println(“b = “+v.b); v.call(v.a,v.b); // CALL BY … Continue reading
Constructor overloading in java
Constructor overloading in java using System; public class CParent { public int PubA; private int PriA; protected int ProA; public CParent() { } public CParent(int a, int b, int c) : this() { this.PriA = a; this.ProA = b; … Continue reading