wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes What is the Diff between Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "What is the Diff between "byte[] v1;" and "byte [] v1;" ?" Watch "What is the Diff between "byte[] v1;" and "byte [] v1;" ?" New topic

What is the Diff between "byte[] v1;" and "byte [] v1;" ?

Viswanathan Ramasamy

Joined: Nov 14, 2005
Posts: 23
I'm creating a prepared statement for oracle using java. I want to convert the attribute to BLOB type. Wherein if I have my attribute as byte[] it is converting it to "java.sql.other" type, This worked properly when i gave the declaration as byte [](there is a space btwn byte and []). Could you please tell me what is the diff btwn these two stmt.

With Regards<br />Viswa
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
sounds like a bug in the JDBC driver, or else there's something Oracle specific I'm not privy to.

Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
There is no difference between byte[] and byte [], as far as I know. I'm sure the reason must be something else.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

I'm going to move this to JDBC, although I don't think we've heard anything about the real causes of the problem.

[Jess in Action][AskingGoodQuestions]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33117

Can you post a little code to show how you are passing/declaring the byte[]. Maybe something weird is going on with casting.

As Ilja pointed out, these should compile to the same bytecode.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: What is the Diff between "byte[] v1;" and "byte [] v1;" ?
jQuery in Action, 3rd edition