USING FOR LOOP ACCEPT THE NAME HOBBY AND AGE OF 5 FRIENDS AND STORE THEM IN A TABLE.DETAILS MUST BE ENTERED BY USER. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

USING FOR LOOP ACCEPT THE NAME HOBBY AND AGE OF 5 FRIENDS AND STORE THEM IN A TABLE.DETAILS MUST BE ENTERED BY USER.

Help

17th Feb 2020, 1:35 PM
abdifatah Adow
abdifatah Adow - avatar
13 Answers
+ 2
Table means database , which database you use?
17th Feb 2020, 1:40 PM
Prathvi
Prathvi - avatar
+ 2
abdifatah Adow could you share with us the code that you have tried? Hope you have established JDBC. It would be helpful for us to answer your question if you have tried it on your own and failed because we can make corrections but expecting the whole code is not encouraged. Kindly go through the thread below to maximize your chances of getting an answer from the community. Thank you. https://www.sololearn.com/discuss/333866/?ref=app
17th Feb 2020, 1:41 PM
Avinesh
Avinesh - avatar
+ 2
What type of help or what is the problem
17th Feb 2020, 1:46 PM
Prathvi
Prathvi - avatar
+ 1
Yes
17th Feb 2020, 1:41 PM
abdifatah Adow
abdifatah Adow - avatar
+ 1
Avinesh . I tried the code. Need some help and addition
17th Feb 2020, 1:45 PM
abdifatah Adow
abdifatah Adow - avatar
+ 1
package Party; import java.util.Scanner; public class party{ public static void main (String[]args){ int length; Scanner input=new Scanner(System.in); System.out.println("Enter number of friends"); length=input.nextInt(); String[] names =new String[length]; for(int counter =0; counter<length; counter ++){ System.out.println("Enter name of friend "+(counter+1)); names[counter] =input.next(); } input.close(); System.out.println("your friends are"); for(int counter =0; counter<length; counter ++){ System.out.println(names [counter]); } } }
17th Feb 2020, 1:51 PM
abdifatah Adow
abdifatah Adow - avatar
+ 1
can not do the age and table storing. kindly help
17th Feb 2020, 1:52 PM
abdifatah Adow
abdifatah Adow - avatar
+ 1
Where is your Java database connectivity code
17th Feb 2020, 1:54 PM
Prathvi
Prathvi - avatar
+ 1
Am not good at java
17th Feb 2020, 1:54 PM
abdifatah Adow
abdifatah Adow - avatar
+ 1
Ok , create the table in database And download jdbc driver jar file Than copy the jar file and paste in lib folder of jre
17th Feb 2020, 1:58 PM
Prathvi
Prathvi - avatar
17th Feb 2020, 1:59 PM
Avinesh
Avinesh - avatar
0
So i don't know. Thats what i tried
17th Feb 2020, 1:55 PM
abdifatah Adow
abdifatah Adow - avatar
0
Thank you
17th Feb 2020, 2:00 PM
abdifatah Adow
abdifatah Adow - avatar