Home Page
(current)
Lessons
Articles
Online Programs
Online Programs
->
Programming
->
Programming
Freemarker Template Quiz
10 Questions
15 Questions
20 Questions
30 Questions
Question 1 (1 Points)
ในการสร้าง macro แบบนี้ `<@myMacro/>`, directive ไหนที่ใช้ในการกำหนด macro?**
(1)
`<#macro>`
(2)
`<#def>`
(3)
`<#function>`
(4)
`<#create>`
Question 2 (1 Points)
ในการสร้าง custom directive, คลาสไหนใน Java ที่ควรถูก implement?**
(1)
Directive
(2)
TemplateDirective
(3)
TemplateDirectiveModel
(4)
CustomDirective
Question 3 (1 Points)
หากต้องการเข้าถึงข้อมูลจาก Java object ใน Freemarker, วิธีไหนที่เหมาะสมที่สุด?**
(1)
ประกาศตัวแปรใน Java แล้วเรียกใช้ใน Freemarker โดยตรง
(2)
ใช้ reflection ใน Java แล้วส่งผลลัพธ์ไปยัง Freemarker
(3)
สร้าง DataModel แล้วส่งไปยัง Freemarker
(4)
เขียน code Java ภายใน Freemarker template
Question 4 (1 Points)
ใน Freemarker, การอ้างถึงตัวแปรใช้เครื่องหมายใด?
(1)
{}
(2)
[]
(3)
()
(4)
${}
Question 5 (1 Points)
วิธีการแสดงค่าเริ่มต้นของตัวแปร name หากไม่มีค่าคือ "Guest" คือ ...
(1)
${name?default("Guest")}
(2)
${name || "Guest"}
(3)
${name!Guest}
(4)
${name ?? "Guest"}
Question 6 (1 Points)
ถ้าต้องการวนซ้ำข้อมูลใน List ควรใช้ directive ใด?
(1)
<#list>
(2)
<#loop>
(3)
<#foreach>
(4)
<#iterate>
Question 7 (1 Points)
การแสดงตัวแปรทำได้โดยใช้...
(1)
`${variable}`
(2)
`{{variable}}`
(3)
`<#variable>`
(4)
`$(variable)`
Question 8 (1 Points)
การนำเข้า template อื่นใช้ directive ไหน?
(1)
`<#import>`
(2)
`<#include>`
(3)
`<#extend>`
(4)
`<#insert>`
Question 9 (1 Points)
อะไรที่ถูกใช้เป็น directive สำหรับการตรวจสอบเงื่อนไขใน Freemarker?
(1)
<#if>
(2)
<#condition>
(3)
<#check>
(4)
<#verify>
Question 10 (1 Points)
สำหรับการจัดการข้อผิดพลาด, directive ใดที่ใช้บ่อยใน Freemarker?
(1)
<#fail>
(2)
<#error>
(3)
<#break>
(4)
<#attempt>
You got
/ 10
Viewers : 3,268
Other Programs
Freemarker Template Quiz
Lessons
Articles
Online Programs