JavaBean零碎知識

2021-09-01 18:31:46 字數 681 閱讀 3978

<%--

//上面等價於下列操作

//1.從scope(session)中獲取id(customer)屬性值,賦值給class(com.stuipid.bean.customer)型別的id(customer)變數

customer customer = (customer)session.getattribute("customer");

//2.若屬性為null,則利用反射建立乙個新的物件複製給id(customer),並以id(customer)為屬性名加入到scope(session)中

if(customer == null)

--%>

age: 

<%--

customer.setage(10);

<%=customer.getage() %>

---%>

age:

address:

name:

<%--

object customer2 = request.getattribute("customer");

if(customer2==null)

--%>

零碎知識C

c 中 dec,hex,oct,fixed,scientific,left,right,ws,setfill,setw,setprecision,eof,get,getline都是什麼意思 dec是十進位制 如cout這些是格式控制符 在使用時要加標頭檔案 include fixed是固定的意思 p...

零碎知識點

1.反斜槓也可拼接字串 window.nl ad function window.nl ad function 2.在console.log 中新增樣式 var a hello console.log c a,font size 400 background blue color white 3 通...

js 零碎知識整理

var arr 1,2,3,4,5 arr.length 3 console.log arr 1,2,3 直接改變陣列的length的值 var arr 1,1,2,2,3,3 const removeduplicateltems arr new set arr console.log remove...