or
  1. Need in java🤔

    I need the solution in java bro: The Veltech teams has been assigned the task of creating user ids for all the students for attending online exam. Also the Veltech has designed a process for generating the user id using the students first name, last name, district PIN code and a number N. The process defined by veltech is as below: Step 1: Compare the length of first name and last name of the student. The one that is shorter will be called Smaller name and the one that is longer will be called the Longer name. If both first name and last name are the equal length, then the name that appears earlier in alphabetical order will be called Smaller name and the name that appears later in alphabetical order will be called the Longer name. Step 2: The user id should be generated as below: Last letter of smaller name+ Entire word of Longer name+ Digit at position N in the PIN when traversing PIN from left to right+ Digit at position N in the PIN when traversing the PIN from right to left. Step 3: Toggle the alphabets of the user id generated in step-2 i.e upper-case alphabets should become lowercase and lower-case alphabets should become upper-case. You are part of veltechs team and youre requested to write a method to generate participants user id using the above rules. Input Format: Input1 is First_Name Input2 is Last_Name Input3 is PIN Input4 is the number N Constraint: The value of N (input 4) will always be less than or equal to the number of digits in the PIN. Input Test Case: 0 If the students details are as follows: First_Name= Rajiv Last_Name= Roy PIN=560037 N=6 Output Test Case 0: The user id will be=Last letter of smaller name+ Entire word of Longer name+ Digit at position N in the PIN when traversing PIN from left to right+ Digit at position N in the PIN when traversing the PIN from right to left = y+ Rajiv+7+5 Therefore user id= yRajiv75 After toggle the alphabets, user-id=YrAJIV75 Input Test Case: 1 First_Name= Manoj Last_Name= Kumar PIN=561327 N=2 Output Test Case 1: The user id will be=Last letter of smaller name+ Entire word of Longer name+ Digit at position N in the PIN when traversing PIN from left to right+ Digit at position N in the PIN when traversing the PIN from right to left =r+Manoj+6+2 =rManoj62 After toggle the alphabets=RmANOJ62

    Hello Subash!

    Here is the solution for the question you are asking for, I solved it in procedural way but if you are among the one who prefer OOP style then you can still ask it for me cause I have solved it from both methods but here I am just going to leave procedural one....

    //author:Manish Acharya

    import java.util.Scanner;

    import java.util.*;


    public class idgenerator {


    public static void main(String[] args) {

    String small_name="", long_name="", new_small_name="", new_long_name="";

    char lr='a', rl='b';

    int k=0, compare=0;

    String id, reverse="";

    Scanner userinput = new Scanner(System.in);

    System.out.println("Enter the first name:");

    String first_name = userinput.nextLine();

    System.out.println("Enter the last name:");

    String last_name = userinput.nextLine();

    System.out.println("Enter the PIN:");

    String pin = userinput.nextLine();

    System.out.println("Enter any number N:");

    System.out.println("Note: The given number should be less than or equal to PIN in length:");

    int number = userinput.nextInt();

    //checking part

    if(number<=pin.length()) {

    if(first_name.length() < last_name.length()) {

    small_name = first_name;

    long_name = last_name;

    }

    else if(first_name.length() > last_name.length()) {

    long_name = first_name;

    small_name = last_name;

    }

    else if(first_name.length() == last_name.length()) {

    compare = first_name.compareTo(last_name);

    if(compare<0) {

    small_name = first_name;

    long_name = last_name;

    System.out.println("yes");

    }

    else if(compare>0){

    long_name = first_name;

    small_name = last_name;

    }

    else {

    System.out.println("They are same!");

    }

    }

    else {

    System.out.println("Caught an unknown error!");

    }

    }

    else {

    System.out.println("Invalid number entered!");

    }

    //lowercase to uppercase and vice versa

    for(int i=0; i<small_name.length(); i++) {

    char a = small_name.charAt(i);

    if(a >= 97 && a <= 123)

            {

               a = Character.toUpperCase(a); 

            }

            else if(a >= 65 && a <= 96)

            {

            a = Character.toLowerCase(a);

            }

    new_small_name = new_small_name + a;

    }

    for(int i=0; i<long_name.length(); i++) {

    char a = long_name.charAt(i);

    if(a >= 97 && a <= 123)

            {

               a = Character.toUpperCase(a); 

            }

            else if(a >= 65 && a <= 96)

            {

            a = Character.toLowerCase(a);

            }

    new_long_name = new_long_name + a;

    }

    //getting number from left to right and vice versa

    for(int j=0; j<number; j++) {

    lr = pin.charAt(j);

    }

    for(int j=pin.length()-1; j>=0; j--) {

    reverse = reverse + pin.charAt(j);

    }

    for(int j=0; j<number; j++) {

    rl = reverse.charAt(j);

    }

    //printing out id

    System.out.println("Your ID is:" + new_small_name.charAt(new_small_name.length()-1) + new_long_name + lr + rl);

    }


    }


  2. First learn basic HTML, then CSS and responsive CSS for Static websites and thereafter JavaScript and PHP for dynamic pages. If you also want to learn jQuery for more better works learn it at the same time with JavaScript

  3. The terms “pass by value” and “pass by reference” are used to describe how variables are passed on. To make it short: pass by value means the actual value is passed on. Pass by reference means a number (called an address) is passed on which defines where the value is stored.