Tuesday, October 5, 2021

 


package qasignpackage;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import java.util.Map.Entry;

public class SampleTest {

    public static void main(String[] args) {

  HashMap<String, String> hmap=new HashMap<String,String>();

                  hmap.put("1", "qa"); 

                  hmap.put("2", "sign"); 

                  hmap.put("3", "selenium");

  for (Entry<String,String> entry: hmap.entrySet()) {

  System.out.println("Key = " + entry.getKey() +

                      ", Value = " + entry.getValue());

  }

  }

 

Related Posts:

  • Data Types in Java Based on the type of data stored, data types are classifying as 3 types in Java. Primitive Datatype (Fundamental Datatype): Derived Datatype User Defined Datatype Primitive Datatype (Fundamental Datatype):  The da… Read More
  • Selenium Interview Questions and Answers I have attended some interviews during my career. I am sharing with you questions i was asked in the interviews. Hope these questions are helpful to the readers.    A Java Program to retrieve the data fro… Read More
  • Why Webdriver driver = new FirefoxDriver();        WebDriver driver =  new FirefoxDriver();                   (vs)        FirefoxDriver driver =  new Firef… Read More
  • Selenium Example: How to verify whether the table column is sorted or not? Question: How do you check whether a table data(values) is sorted or not? Sorting happens when clicking on Table Header(Ex: Name, which is a link). Name Venu Avinash Dharma Answer: We c… Read More
  • Variables and Methods Variables: Variable is a name given to a memory location in which, we can store some value which can be used in a program. Variable Declaration: It is process of specifying what type of data to be stored into the memory … Read More

0 comments:

Post a Comment

Selenium Training in Realtime

Blog helps to a student or IT employee to develop or improve skills in Software Testing.

Followers

About Me

My photo
Hyderabad, Andhra Pradesh, India
I am Automation Testing Professional. I have completed my graduation in B.Tech (Computers) from JNTU Hyderabad and started my career in Software Testing accidentally since then, I passionate on learning new technologies

Contact Form

Name

Email *

Message *

Popular Posts