@@ -0,0 +1,1101 @@
+/*%0D%0A * To change this license header, choose License Headers in Project Properties.%0D%0A * To change this template file, choose Tools %7C Templates%0D%0A * and open the template in the editor.%0D%0A */%0D%0Apackage com.javaquery.core.basic;%0D%0A%0D%0A/**%0D%0A * Example: Assign same value to multiple variable.%0D%0A *%0D%0A * @author javaQuery%0D%0A * @date 2nd January, 2016%0D%0A * @Github: https://github.com/javaquery/Examples%0D%0A */%0D%0Apublic class AssignSameValue %7B%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        int red = 0, green = 0, blue = 0;%0D%0A%0D%0A        String color = %22white%22; // args%5B0%5D%0D%0A%0D%0A        if (%22white%22.equalsIgnoreCase(color)) %7B%0D%0A            /* assign same value to red, green, blue */%0D%0A            red = green = blue = 255;%0D%0A        %7D else if (%22black%22.equalsIgnoreCase(color)) %7B%0D%0A            /* assign same value to red, green, blue */%0D%0A            red = green = blue = 0;%0D%0A        %7D else %7B%0D%0A            /* other else if...else for more color combinations */%0D%0A        %7D%0D%0A%0D%0A        System.out.println(%22Color code:%22);%0D%0A        System.out.println(%22red = %22 + red + %22, green = %22 + green + %22, blue = %22 + blue);%0D%0A    %7D%0D%0A%7D%0D%0A

Assign same value to multiple variables