Demo Course HandbookWeek 2: Package featuresQuiz 2.4: Question types and codeQuiz 2.4: Question types and code Question 1Which keyword limits a field to its own class? public private protected finalShow correct answerprivateShow hintThink of access modifiers.Question 2Which statements about this Java code are true?List<String> names = List.of("Ada", "Linus");names.add("Grace"); List.of returns an immutable list The add call throws an exception The list ends up with three names List<String> is not valid Java syntaxShow correct answerList.of returns an immutable listThe add call throws an exceptionQuestion 3Which method returns the larger of two numbers? This one:int max(int a, int b) { return a < b ? a : b;} This one:int max(int a, int b) { return a > b ? a : b;}Show correct answerThis one:int max(int a, int b) { return a > b ? a : b;}Question 4Which React component shows the count after a click? This one:function Counter() { const [count, setCount] = useState(0); return <button onClick={() => count + 1}>{count.toString()}</button>;} This one:function Counter() { const [count, setCount] = useState(0); return <button onClick={() => setCount(count + 1)}>{count}</button>;}Show correct answerThis one:function Counter() { const [count, setCount] = useState(0); return <button onClick={() => setCount(count + 1)}>{count}</button>;}Question 5Name the HTTP method that creates a resource in a REST API.Show correct answerPOSTShow hintIt is one word in capitals.