Author Archives: MasterJavaTutorial

List toArray() Method

java.util.List.toArray() method can be used to convert a list to an array. Syntax of List toArray() Method Object[] java.util.List.toArray() The return type of this method is Object[]. The below… Read more »

Practice Problems on enum – Set2

Will the below code of enum compile?? package com.masterjavatutorial; public enum MONTHS { public void methodOne(){ System.out.println(“Method One”); } } Semicolon is mandatory if any method is declared in… Read more »