Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 12199
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
 
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic