Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Viswanathan Ramasamy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sounds like a bug in the JDBC driver, or else there's something Oracle specific I'm not privy to.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no difference between byte[] and byte [], as far as I know. I'm sure the reason must be something else.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to JDBC, although I don't think we've heard anything about the real causes of the problem.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Viswa,
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic