Static members of Java classes

0 views
Skip to first unread message

Chris Double

unread,
Sep 24, 2007, 8:53:25 PM9/24/07
to The Vodka Language Discussion Group
How do you call static methods of Java classes. Accessing JDBC for
example:

import native java.sql.DriverManager;

How do I call DriverManager.getConnection?

Chris.
--
http://www.bluishcoder.co.nz

Chris Double

unread,
Sep 25, 2007, 12:55:02 AM9/25/07
to The Vodka Language Discussion Group
On Sep 25, 12:53 pm, Chris Double <chris.dou...@gmail.com> wrote:
> How do you call static methods of Java classes.

Found the answer. Append Class to the name of the class. This worked:

import native java.sql.DriverManager;

DriverManagerClass.getConnection(...);

Chris.
--
http://www.bluishcoder.co.nz

tiark...@googlemail.com

unread,
Sep 25, 2007, 5:58:36 PM9/25/07
to The Vodka Language Discussion Group
Exactly, that's the way it is! I'm not really happy with this naming
scheme, but since the class name itself is already taken by the
constructor method, it seemed to be the least unreasonable thing to
do. Note that class fields declared as static final are also there.

- Tiark

Reply all
Reply to author
Forward
0 new messages