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)
เมื่อต้องการใส่ค่าเริ่มต้นให้กับตัวแปรที่อาจไม่มีใน model ควรใช้...
(1)
?default
(2)
?exists
(3)
?isset
(4)
?value
Question 2 (1 Points)
วิธีการเขียน loop เพื่อวนซ้ำผ่านรายการของข้อมูลคืออะไร?
(1)
<#loop item in items>
(2)
<#each items as item>
(3)
<#list items as item>
(4)
<#foreach items as item>
Question 3 (1 Points)
ถ้าต้องการประกาศตัวแปรใหม่ใน template ควรใช้ directive ใด?
(1)
<#var>
(2)
<#declare>
(3)
<#set>
(4)
<#initialize>
Question 4 (1 Points)
Freemarker เป็นอะไร?
(1)
เครื่องมือสำหรับการประมวลผลภาษา Java
(2)
Template engine สำหรับ Java
(3)
Framework สำหรับการพัฒนาเว็บ
(4)
ฐานข้อมูลสำหรับเว็บ
Question 5 (1 Points)
เมื่อต้องการสร้าง nested template ใน Freemarker, directive ใดที่สามารถใช้เพื่อนำเข้า template อื่น?
(1)
<#import>
(2)
<#include>
(3)
<#use>
(4)
<#load>
Question 6 (1 Points)
หากต้องการเข้าถึงข้อมูลจาก Java object ใน Freemarker, วิธีไหนที่เหมาะสมที่สุด?**
(1)
ประกาศตัวแปรใน Java แล้วเรียกใช้ใน Freemarker โดยตรง
(2)
ใช้ reflection ใน Java แล้วส่งผลลัพธ์ไปยัง Freemarker
(3)
สร้าง DataModel แล้วส่งไปยัง Freemarker
(4)
เขียน code Java ภายใน Freemarker template
Question 7 (1 Points)
ในการรวม templates หรือการใช้ nested templates, directive ใดที่ควรใช้?
(1)
<#include>
(2)
<#import>
(3)
<#nest>
(4)
<#embed>
Question 8 (1 Points)
จากตัวเลือกต่อไปนี้ อันไหนไม่ใช่ built-in ของ Freemarker?
(1)
upper_case
(2)
length
(3)
size
(4)
split
Question 9 (1 Points)
คำสั่งไหนที่สามารถใช้เพื่อแปลงข้อมูลเป็น string ใน Freemarker?
(1)
`asString()`
(2)
`.to_string`
(3)
`.string`
(4)
`toString()`
Question 10 (1 Points)
หากต้องการใช้ macro, directive ใดที่ควรใช้?
(1)
<#def>
(2)
<#function>
(3)
<#macro>
(4)
<#method>
You got
/ 10
Viewers : 7,616
Other Programs
Freemarker Template Quiz
Lessons
Articles
Online Programs