⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 staticmethods.html

📁 ONGL学习的好书,介绍ONGL的相关知识
💻 HTML
字号:
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Calling Static Methods</title><link href="../docbook.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.65.0" name="generator"><link rel="home" href="index.html" title="OGNL Language Guide"><link rel="up" href="basicExpressions.html" title="Chapter&nbsp;4.&nbsp;Expressions"><link rel="previous" href="constructors.html" title="Calling Constructors"><link rel="next" href="staticFields.html" title="Getting Static Fields"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Calling Static Methods</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="constructors.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;4.&nbsp;Expressions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="staticFields.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="staticMethods"></a>Calling Static Methods</h2></div></div><div></div></div><p>You can call a static method using the syntax <tt class="constant">@</tt><tt class="varname">class</tt><tt class="constant">@</tt><tt class="function">method(args)</tt>. If you leave out class, it defaults to <tt class="classname">java.lang.Math</tt>, to
            make it easier to call <tt class="function">min</tt> and <tt class="function">max</tt> methods. If you specify the class, you must give the fully qualified name.</p><p>If you have an instance of a class whose static method you wish to call, you can call the method through the object as if it was an instance method.</p><p>If the method name is overloaded, <span class="acronym">OGNL</span> chooses the right static method to call using the same procedure it uses for overloaded instance methods.</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="constructors.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="basicExpressions.html"><img src="../images/navigation/up.gif" alt="Up"></a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="staticFields.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Calling Constructors&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html"><img src="../images/navigation/home.gif" alt="Home"></a></td><td valign="top" align="right" width="40%">&nbsp;Getting Static Fields</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -