Professional Documents
Culture Documents
Store Value in Array Soln
Store Value in Array Soln
personName: String
personAddress: String
Input pattern
1st line states the number of
make. object you need to
From 2nd line you willget the data
print on the screen. that you need to
Consider thefollowing input and
better clarity for the output for the
application
cs iON Digital Learning X Content Player | Content MI HackerRank Question - Store
081
Line
Test Results
Custom Input Run Code Run Tests
ent G Autocomplete Ready
er.personId) ;
er.personName);
er.personAddress);
ame;
onAddress;
e){
ress () {
Language Java 15
1 import java.io,*;
1. Store values in the array 2 import java.util. *;
3 import java.text.*;
Consider the following class example with its 4 import java.math.*;
attributes 5 import java.util.reg
Class Person 6
personld: int
7 Vpublic class Solutic
personName: String 8 V public static v
personAddress: String 9 Scanner sc
10 int n= SC.
You have been given the task to store the values in
the array and print it on the screen.
11 Person[Up
12 V for(int i=
Input pattern
1st line states the number of object you need to
make. Test Results Cus
From 2nd line you willget the data that youneed to
print on the screen.
Consider the following input and output for the Compiled successful
better clarity for the application
Sample output:
1
siON Digital Learning X 9 Content Player | Content M HackerRank Question - Store X
81