博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Java中访问自定义类常量的简化
阅读量:4229 次
发布时间:2019-05-26

本文共 206 字,大约阅读时间需要 1 分钟。

访问类的常量的时候,本来需要携带类型.访问,如果另一个类中使用较多就显得很不漂亮,可以import该常量或者全部*,这样就不需要携带类名了。

import static org.fkit.hrm.util.common.HrmConstants.USERTABLE;

import static org.fkit.hrm.util.common.HrmConstants.*;

就可以直接访问USERTABLE.

转载地址:http://opjqi.baihongyu.com/

你可能感兴趣的文章
Eric Sink on the Business of Software
查看>>
LPI Linux Certification in a Nutshell
查看>>
ATL Internals: Working with ATL 8 (2nd Edition)
查看>>
Programming Sudoku
查看>>
Collaborative Geographic Information Systems
查看>>
The Definitive Guide to the .NET Compact Framework
查看>>
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
查看>>
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
查看>>
Access VBA Programming
查看>>
Data Entry and Validation with C# and VB. NET Windows Forms
查看>>
C++ Network Programming, Volume 2: Systematic Reuse with ACE and Frameworks
查看>>
Java 6 Platform Revealed
查看>>
Beginning ASP.NET 2.0 Databases: From Novice to Professional
查看>>
Microsoft Windows 2000 Scripting Guide
查看>>
Visual Basic .NET Bible
查看>>
The Struts Framework: Practical Guide for Java Programmers
查看>>
C#.net Web Developer's Guide
查看>>
Virtualization with VMware ESX Server
查看>>
System Architecture with XML
查看>>
Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & .NET
查看>>