• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Reading db.db file

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I'm trying to read db.db file.
I have writtena small program for that. I jsut want to know can I add few statements to the provided class functions for producing output or not? Because I'm adding println statements in toString() function. Is it valid to do that?
Thank you,
Pallavi
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pallavi,
You really dont want to have System.out.println statements in a toString method. This is a standard method in all objects that other programmers expect to have work in a standard way.
Having said that - you can put debugging code anywhere you like before you hand in the assignment - just make sure you get rid of it before you hand it in. If you do something like:
System.out.println("DEBUG ...");
then you can do a search for the DEBUG string before you do your final compile, and get rid of anything like that.
Regards, Andrew
 
Pallavi Mahajan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andrew,
Thank you for the comments. I removed all the printf statement from my code ,also I can see the db.db contents on console. I am little confused here, do I need to store this output in data Stucture or text file or anything?
I have no idea how to proceed now?
Pallavi
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic