• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

scanner variables into object for insertion into database.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In one class im using scanner to store information, such as forename, surname.

What im trying to do is take those variables, then create a new object and pass those variables into the object, which will then store in the database.

so scanner is

the following is me creating the new object, but the content is static, where i want it to be the variables, but if i replace PAUL with forename, it passes out.

this is my constructor
 
paulio macmurray
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

this is as far as i have got but

a) if i javac in cmd, i get 2 errors. its pointing at the N of telNumber, and the P of Personal, saying it cant find symbol.

b) i compile in netbeans, it asks for all the input, but then says "cant connect"

here is the code

 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!