Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. Which of the following is correct about XSSFWorkbook class in Apache POI?
  1.    It is a class that is used to represent both high and low level Excel file formats
  2.    It belongs to the org.apache.xssf.usemodel package
  3.    It implements the Workbook interface
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 2. What are the features of the Apache POI?
  1.    Apache POI provides stream-based processing, that is suitable for large files and requires less memory
  2.    Apache POI is able to handle both XLS and XLSX formats of spreadsheets
  3.    Apache POI contains HSSF implementation for Excel '97(-2007) file format i.e XLS
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these




Question 3. What are the commonly used components of Apache POI?
  1.    HSSF
  2.    XSSF
  3.    POIFS
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 4. Which of the following is a valid way to compute max in a formula cell?
  1.    cell.setCellValue("MAX(C2:C3)")
  2.    cell.setCellValue("MAX_VALUE(C2:C3)")
  3.    cell.setCellValue("MAXIMUM(C2:C3)")
  4.    None of the above
 Discuss Question
Answer: Option A. -> cell.setCellValue("MAX(C2:C3)")




Question 5. What are the steps to create a cell in a spreadsheet in Apache POI?
  1.    //create new workbook
  2.    XSSFWorkbook workbook = new XSSFWorkbook();
  3.    //create spread sheet with a name
  4.    XSSFSheet spreadsheet = workbook.createSheet("new sheet");
  5.    All the above
 Discuss Question
Answer: Option E. -> All the above




Question 6. What are the jar files minimum to run the sample code?
  1.    poi-3.10-FINAL.jar
  2.    poi-ooxml-3.10-FINAL.jar
  3.    commons-codec-1.5.jar
  4.    poi-ooxml-schemas-3.10-FINAL.jar
  5.    All of these
 Discuss Question
Answer: Option E. -> All of these




Question 7. How many objects will be eligible for garbage collection after line 7?
public class TutorialGC
{
public static void main(String [] args)
{
Object a = new Integer(100); // Line1
Object b = new Long(100); // Line2
Object c = new String(\"100\"); // Line3
a = null; // Line4
a = c; // Line5
c = b; // Line6
b = a; // Line7
// Rest of the code here
}
}
  1.    0
  2.    1
  3.    2
  4.    3
 Discuss Question
Answer: Option B. -> 1




Question 8. Which of the following is correct about XSSFPrintSetup class in Apache POI?
  1.    This is a class under the org.apache.poi.xssf.usermodel package
  2.    It is used to set print page size, area, options, and settings
  3.    It implements the PrintSetup interface
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 9. What are the advantages of Apache POI?
  1.    JExcel doesn't support xlsx format whereas POI supports both xls and xlsx formats
  2.    Apache POI provides stream-based processing, that is suitable for large files and requires less memory
  3.    Apache POI provides excellent support for working with Microsoft Excel documents and it's able to handle both XLS and XLSX formats of spreadsheets
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 10. Which of the following type of cell represents number cell in Apache POI?
  1.    XSSFCell.Cell_Type_Numeric
  2.    XSSFCell.Cell_Numeric
  3.    XSSFCell.Numeric
  4.    None of the above
 Discuss Question
Answer: Option A. -> XSSFCell.Cell_Type_Numeric




Latest Videos

Latest Test Papers