Question
Consider the following Java code: import
java.util.Arrays; public class Splitter { Â Â public static void main(String[] args) { Â Â Â Â String data = "item1::value1::item2::value2"; Â Â Â Â String[] parts = data.split("::"); Â Â Â Â System.out.println(parts.length + " " + parts[1]); Â Â } } What will be the output of this program?Solution
Correct Answer: A (The string is split by "::". The parts are "item1", "value1", "item2", "value2". So parts.length is 4. parts[1] is "value1".)
Which of the following word use to describe the shape of earth is
I was lucky to have __________ the plane crash.
Which of the following Indian states/UTs has the highest scheduled tribe population in comparison to total population?
Which act gave the power to declare ordinance to Viceroy for the first time?
Consider the following statements related to the Growth of population in underdeveloped nations:
(1) Low savings due to high level consumption...
How many Ramsar sites are there in Himachal Pradesh?
Sultan Abu Bakr Shah was from which of the following dynasties?
Rickets is caused due to deficiency of:
Which of the following city of Gujrat 145th annual Rath Yatra festival of Lord Jagannath has started?
First Spices Park of Rajasthan was established at -