Soumettre la recherche
Mettre en ligne
Julz Cutaran - Common Pitfalls in Java
•
Télécharger en tant que PPT, PDF
•
0 j'aime
•
789 vues
Maria Odea Ching-Mallete
Suivre
Technologie
Économie & finance
Signaler
Partager
Signaler
Partager
1 sur 14
Télécharger maintenant
Recommandé
The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189
Mahmoud Samir Fayed
Exceptional exceptions
Exceptional exceptions
Llewellyn Falco
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212
Mahmoud Samir Fayed
2020 경희대학교 데이터베이스 발표
2020 경희대학교 데이터베이스 발표
JunhoPark45
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 20 of 184
The Ring programming language version 1.5.3 book - Part 20 of 184
Mahmoud Samir Fayed
Two Scoops of Django - Common Patterns for Forms
Two Scoops of Django - Common Patterns for Forms
Vic Yang
Contraints
Contraints
Anar Godjaev
Recommandé
The Ring programming language version 1.6 book - Part 22 of 189
The Ring programming language version 1.6 book - Part 22 of 189
Mahmoud Samir Fayed
Exceptional exceptions
Exceptional exceptions
Llewellyn Falco
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212
Mahmoud Samir Fayed
2020 경희대학교 데이터베이스 발표
2020 경희대학교 데이터베이스 발표
JunhoPark45
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 20 of 184
The Ring programming language version 1.5.3 book - Part 20 of 184
Mahmoud Samir Fayed
Two Scoops of Django - Common Patterns for Forms
Two Scoops of Django - Common Patterns for Forms
Vic Yang
Contraints
Contraints
Anar Godjaev
Two scoopsofdjango common patterns for forms
Two scoopsofdjango common patterns for forms
Shih-yi Wei
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16 dealing with the user model
Shih-yi Wei
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
Specs2
Specs2
Piyush Mishra
The Ring programming language version 1.5.4 book - Part 20 of 185
The Ring programming language version 1.5.4 book - Part 20 of 185
Mahmoud Samir Fayed
Data Structure
Data Structure
Hitesh Mohapatra
Analyzing Functional Programs
Analyzing Functional Programs
Dave Cleaver
Validation
Validation
suresh pasupuleti
Sql
Sql
prabhuftz
Array imp of list
Array imp of list
Elavarasi K
Sql
Sql
ftz 420
The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185
Mahmoud Samir Fayed
Scala on Your Phone
Scala on Your Phone
Michael Galpin
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
Mahmoud Samir Fayed
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210
Mahmoud Samir Fayed
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
Mahmoud Samir Fayed
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196
Mahmoud Samir Fayed
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
Mahmoud Samir Fayed
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
Mahmoud Samir Fayed
Contenu connexe
Tendances
Two scoopsofdjango common patterns for forms
Two scoopsofdjango common patterns for forms
Shih-yi Wei
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16 dealing with the user model
Shih-yi Wei
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
Specs2
Specs2
Piyush Mishra
The Ring programming language version 1.5.4 book - Part 20 of 185
The Ring programming language version 1.5.4 book - Part 20 of 185
Mahmoud Samir Fayed
Data Structure
Data Structure
Hitesh Mohapatra
Analyzing Functional Programs
Analyzing Functional Programs
Dave Cleaver
Validation
Validation
suresh pasupuleti
Sql
Sql
prabhuftz
Array imp of list
Array imp of list
Elavarasi K
Sql
Sql
ftz 420
The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185
Mahmoud Samir Fayed
Scala on Your Phone
Scala on Your Phone
Michael Galpin
Tendances
(13)
Two scoopsofdjango common patterns for forms
Two scoopsofdjango common patterns for forms
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16 dealing with the user model
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
Specs2
Specs2
The Ring programming language version 1.5.4 book - Part 20 of 185
The Ring programming language version 1.5.4 book - Part 20 of 185
Data Structure
Data Structure
Analyzing Functional Programs
Analyzing Functional Programs
Validation
Validation
Sql
Sql
Array imp of list
Array imp of list
Sql
Sql
The Ring programming language version 1.5.4 book - Part 27 of 185
The Ring programming language version 1.5.4 book - Part 27 of 185
Scala on Your Phone
Scala on Your Phone
Similaire à Julz Cutaran - Common Pitfalls in Java
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
Mahmoud Samir Fayed
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210
Mahmoud Samir Fayed
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
Mahmoud Samir Fayed
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196
Mahmoud Samir Fayed
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
Mahmoud Samir Fayed
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
Mahmoud Samir Fayed
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
Mahmoud Samir Fayed
C# Starter L04-Collections
C# Starter L04-Collections
Mohammad Shaker
The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212
Mahmoud Samir Fayed
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#
Vagif Abilov
For Beginners - C#
For Beginners - C#
Snehal Harawande
string tokenization
string tokenization
JayabalanRajalakshmi
Ensure code quality with vs2012
Ensure code quality with vs2012
Sandeep Joshi
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Trace
oysteing
The Ring programming language version 1.7 book - Part 40 of 196
The Ring programming language version 1.7 book - Part 40 of 196
Mahmoud Samir Fayed
The Ring programming language version 1.5.1 book - Part 35 of 180
The Ring programming language version 1.5.1 book - Part 35 of 180
Mahmoud Samir Fayed
The Ring programming language version 1.5.4 book - Part 44 of 185
The Ring programming language version 1.5.4 book - Part 44 of 185
Mahmoud Samir Fayed
Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화
HyeonSeok Choi
Similaire à Julz Cutaran - Common Pitfalls in Java
(20)
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
C# Starter L04-Collections
C# Starter L04-Collections
The Ring programming language version 1.10 book - Part 54 of 212
The Ring programming language version 1.10 book - Part 54 of 212
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#
For Beginners - C#
For Beginners - C#
string tokenization
string tokenization
Ensure code quality with vs2012
Ensure code quality with vs2012
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Trace
The Ring programming language version 1.7 book - Part 40 of 196
The Ring programming language version 1.7 book - Part 40 of 196
The Ring programming language version 1.5.1 book - Part 35 of 180
The Ring programming language version 1.5.1 book - Part 35 of 180
The Ring programming language version 1.5.4 book - Part 44 of 185
The Ring programming language version 1.5.4 book - Part 44 of 185
Refactoring 메소드 호출의 단순화
Refactoring 메소드 호출의 단순화
Dernier
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Dernier
(20)
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Julz Cutaran - Common Pitfalls in Java
1.
Common Pitfalls
2.
1. Not specifying
columns in your select statement (select *)
3.
. . StringBuffer queryString =
new StringBuffer(); queryString.append("SELECT DISTINCT o.name, o.code, o.price, d.discount “); queryString.append("FROM com.exist.model.Order as o, “); queryString.append("com.exist.model.Discounts as d “); . . . Session session = sessionFactory.getCurrentSession(); Query selectQuery = session.createQuery(queryString.toString()); List<Order> orders= selectQuery.list(); . . . List<OrderTo> orderTo = new ArrayList<OrderTo>(); ... for(Order order:orders){ OrderTo oto = new OrderTo oto.setName(order.getName()); . . . orderTo.add(oto); } . . . 2. Select and Transfer
4.
. . . StringBuffer queryString =
new StringBuffer(); queryString.append("SELECT DISTINCT new com.exist.to.OrdersTO "); queryString.append("(o.name, o.code, o.price, d.discount) "); queryString.append("FROM com.exist.model.Orders as o, "); queryString.append("com.exist.model.Discounts as d “); . . . Session session = sessionFactory.getCurrentSession(); Query selectQuery = session.createQuery(queryString.toString()); . . . List<OrdersTO> data = selectQuery.list();
5.
3. Not delegating
computations . . . double bills = someService.getBills(referenceNo); double payments = someService.getPayments(referenceNo) double due = bills - payments; . . .
6.
public class Computations
{ private SomeService someService; private double bills; private double payments; private double due; public Computations(SomeService someService, String reference) { bills = someService.getBills(referenceNo); payments = someService.getPayments(referenceNo) due = bills - payments; } ... <getters of bills, payments and due> }
7.
. . . Computations computations =
new Computations(someService, referenceNo); double bills = computations.getBills(); double payments = computations.getPayments(); double due = computations.getDue(); . . .
8.
4. equals String
literal variable.equals(“String Literal”);
9.
“String literal”.equals(variable);
10.
5. Computing using
double or Double double minuend = 1.1d; double subtrahend = 1.0d; double difference = minuend – subtrahend; Or Double minuend = 1.1d; Double subtrahend = 1.0d; Double difference = minuend.doubleValue() – subtrahend.doubleValue();
11.
BigDecimal minuend =
new BigDecimal(1.1).setScale(2, RoundingMode.HALF_EVEN); BigDecimal subtrahend = 1.0d; BigDecimal difference = minuend.subtract(subtrahend);
12.
6. using objects
in if If (object.getBooleanProperty()) { ... }
13.
if (object!=null &&
object.getBooleanProperty()) { ... } Or if (object!=null && object.getNumericProperty()>0) { ... }
14.
Thanks!
Télécharger maintenant