Thursday, 26 March 2020

Top 10 Interview Questions on Array for Fresher-SDET-Automation Testing 2020?


Top Interview question on Automation testing- Selenium:
  •  How to declare an array?
         int tests[];

  • How to create an array?
         tests= new int[5];

  • How to declare 2d array?
        int[][] matrix;

  • How to create 2d array?
        int[][] matrix = { { 1, 2, 3 }, { 4, 5, 6 } };

  • How to Assign values to array
        tests[0] = 25;
        tests[1] = 30;
        tests[2] = 50;
        tests[3] = 10;
        tests[4] = 5;

  • How to  Declare, Create and Initialize Array on same line
        int tests[] = { 25, 30, 50, 10, 5 };

  • How to loop around an array - Enhanced for loop
   
 for (int mark : marks) {
            System.out.println(mark);
        }


  • How to get Length of an array : Property length
        int length = tests.length; 

  • How to do Sorting An Array?
        int rollnumbers[] = { 12, 5, 7, 9 };

        Arrays.sort(rollnumbers);


  • How to create String Array?
        String[] daysWeek = { "Sunday", "Monday", "Tuesday", "Wednesday",
                "Thursday", "Friday", "Saturday" };


Check below link on top Interview preparation:

SQL Query   Cucumber-BDD    Linux Commands    Maven   GIT   TestNG@after@before
 

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
 

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...