Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the mistake of Java programmer's habitual thinking?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the mistake of Java programmer's habitual thinking". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what is the mistake of Java programmer's habitual thinking.

The structure of the table is as follows:

T_SOME_TABLE {crowid varchar (36); zrmb float (7Magne3); zjdw float (7Phone3);}

Ask the following two pieces of code, which part will make an error and why?

Code snippet 1:

/ / the background code is as follows: String hqlStr= "select SUM (t.zrmb) AS SUM_1,SUM (t.zjdw) AS SUM_2 from T_SOME_TABLE t where 1x1"; List sumList=baseDao.find (hqlStr); / / hibernate implements the query HQL summary statement to return the result List request.setAttribute ("sumList", sumList); / / the foreground code is as follows: String sum1= "; String sum2=" ArrayList sumList=request.getAttribute ("sumList") = = null?null: (ArrayList) request.getAttribute ("sumList"); if (nullroomroomsumList) {for (int iTuno)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report