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
13 odpowiedzi
+ 2
Table means database , which database you use?
+ 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
+ 2
What type of help or what is the problem
+ 1
Yes
+ 1
Avinesh . I tried the code. Need some help and addition
+ 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]);
}
}
}
+ 1
can not do the age and table storing. kindly help
+ 1
Where is your Java database connectivity code
+ 1
Am not good at java
+ 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
+ 1
Then follow this-
https://www.tutorialspoint.com/jdbc/jdbc-insert-records.htm
0
So i don't know. Thats what i tried
0
Thank you