web analytics
Java

Method Overloading in Java

When we write two methods in a class with the same name but with different no. of parameters then we can say that the method can be overloaded. Example : Class AreaCalculator{ public static void main(String args[]){ int l,b,h; AreaCalculator calculate=new AreaCalculator(); calculate.area(l,b); calculate.area(l,b,h); } public int area(int x,int y){ return x*y; Read more…

Java

Thread programming in Java

Thread programming is all about dividing the execution of a program into small parallel units so that the execution less time than when it executes line-by-line. Consider a real world scenario, a user downloading a file from the internet. Without the threads concept, until the file gets downloaded, the user Read more…