Raisa – An Elegant Responsive Blogger Theme

Uncategorized
Raisa an elegant responsive blogger theme, clean and awesome blogger theme for personal blog and designed perfectly for SEO with custom All In One SEO packed, Raisa is stylized into theme for personal blog or anything else. This template is 100% fully responsive so its work completely in many devices and its support RTL also so you can use it for arabic blogs and support with all language.
Read More

Java: Why does this swap method not work?

Uncategorized
Question: I have the following code:public class Main { static void swap (Integer x, Integer y) { Integer t = x; x = y; y = t; } public static void main(String[] args) { Integer a = 1; Integer b = 2; swap(a, b); System.out.println("a=" + a + " b=" + b); } } I expect it to print a=2 b=1, but it prints the opposite. So obviously the swap method doesn't swap a and b values. Why? Answer: This doesn't have anything to do with immutability of integers; it has to do with the fact that Java is Pass-by-Value, Dammit! (Not annoyed, just the title of the article :p ) To sum up: You can't really make a swap method in Java. You just have to do the swap…
Read More