JDBC - Connect and read data from database

From PU/ Programming in Java

Asked on 28 Jan, 2021

Like 0 Dislike 557 Views

Write a simple java program to connect database and read data in the table name"Student"which hava four fields name"id","name","address","DOB",and "Class". Assuming the"id" field as simple number, display the data of the students with id less than 100

Add a comment

20 Answers

Anonymous on 6 Jul, 2022 Like 0 Dislike

Convert padxu.com to an app with one click!

80% of users browse websites from their phones.

Have the App send out push notifications without any extra marketing costs!

MakeMySiteMobile.com

Add a comment

Anonymous on 23 Jun, 2022 Like 0 Dislike

Hello, did you know that there are 241,120 internet directories in the world.

These websites are what drive traffic to YOUR business.

Want more traffic? Want more Sales? We can help - today.

Your website padxu.com is listed in only 90 of these directories.

Get more traffic for your Global audience.

Our automated system adds your website to all of the directories.

You can find it here: getlisted.directory/padxu.com

Act today, and we will expedite your listings and waive the processing charge!

Add a comment

Anonymous on 22 Jun, 2022 Like 0 Dislike

Would you like to send targeted messages to website owners, just like this one?

Contact Page Marketing..

We will deliver your message to website owners, excellent for B2B products.

https://cutt.ly/ChatToUs

Add a comment

Anonymous on 28 May, 2022 Like 0 Dislike

Hey, I just visited your site and found few critical issues. Your site is not ranking well in Google due to these issues.

Many of your potential keywords just stuck on 2nd, 3rd, and 4th page of Google.

You can contact me on:

WhatsApp: https://wa.me/923045568344

FB Messenger: https://m.me/faisalharoonrana

Email: letmeseo@gmail.com

If you want to rank your website’s profitable keywords in Google.

I have already ranked few sites of your competitors they are getting really good results.

I can show details if you contact back.

Regards

Faisal Rana

Add a comment

Anonymous on 20 Apr, 2022 Like 0 Dislike

Hello.

It is with sad regret to inform you TopDataList.com is shutting down.

We have made all our databases available for you for a once off fee.

Visit us on TopDataList.com

Add a comment

Anonymous on 13 Apr, 2022 Like 0 Dislike

Hey, My name is Mike - Just wanted to ask a question I opened a new site and I was told that I shouldn’t use google ads ( not profitable enough) So I decided to do a review of 20 sites that I follow. Here is an article I found on the matter, Can you please tell me what you think of those options. https://bit.ly/37y81Zx Plus, any tips that you could share, it will help. Thanks

Add a comment

Anonymous on 20 Mar, 2022 Like 0 Dislike

Hi, I am interested in some of your products.

Please give me a call on +1 304-873-4360

Add a comment

Anonymous on 1 Dec, 2021 Like 0 Dislike

Hey, I visited your site and I think that your content is amazing! It is really engaging and original, you must have worked so hard to generate such a quality content. We are ForeMedia and we help website owners with great websites to maximize the revenue they make from their website. I would love to buy Ad Spaces on your website and pay you per each impression of the ads on your site. We are Google Ad Exchange Premium partners and we work with more than 100 Ad Network & thousands of premium direct advertisers who would LOVE to buy Ads directly from your site and we can guarantee to increase your revenue by at least 45% compared to other advertising solutions you are currently using. You deserve to earn more for your content and maximize your earning potential and I will help you unlock that potential! There is no cost, you can register to our monetization platform for free on this link: https://foremedia.net/start I will be available for you on the Live Chat if you need any help, or you can email me back to: jenny@foremedia.net if you have any questions. I have at least 17 Premium Advertisers that have asked me to approach you because they would like to advertise on your website on Premium eCPM [cost per impressions] basis. Have a good day & feel free to ping me for any question! Click the link here for 1 minute registration to our platform [it's free!]: https://go.foremedia.net/u/start/

Add a comment

Anonymous on 19 Nov, 2021 Like 0 Dislike

Dropified® automates dozens of the daily tasks required to run a successful dropshipping business, allowing you to focus on marketing and growing your eCommerce stores. Customer places order on your Dropified powered store and pays your retail proce. Dropified forwards the order to supplier and pays wholesale funds and your spplier ships the orders. You keep the profits!

All the big brands like Shopify BigCommerce, WooCommerce trust dropified It's free to setup and publish and then comfortable pricing as you scale. Sign up today and raise your margins - https://bit.ly/3HBko4A

Add a comment

Anonymous on 18 Nov, 2021 Like 0 Dislike

Hey,

Where you are an Entrepreneur or Online marketer or Marketing manager or an Enterprise, benefit from a wide variety of Free Forever tools. Take your business 100% in simple steps and send emails, create pages, and automate your marketing.

The plans start from $0 to custom plans that suit your business and needs. You Start for free and you can cancel anytime. No credit card required.

GetResponse empowers businesses to do what they do, better, because solutions are made for customers whose needs are as diverse and multifaceted as we are. Join the platform and scale your business to new heights. Signup here - https://bit.ly/2YX9swz

Add a comment

Anonymous on 18 Nov, 2021 Like 0 Dislike

Hey,

I use google daily. I recently started to make my searches earn me money. Free money and in cryptocurrency. You will never find a more safer, easier and passive way to earn cryptocurrency.

Join me in the journey to make even a single search pay you free money. It's easy, free and completely safe with no fear of losing any money.

Join https://presearch.org/signup?rid=3094804 and earn money everyday without any effort and more when your referrals join and then their referrals join.

Cheers!

Add a comment

Anonymous on 17 Nov, 2021 Like 0 Dislike

Accept payments from customers at the lowest charges and get your payments settled instantly. Instant activation in 2 minutes. Zero setup fee and no annual maintenance fee. Pay as you use.

Automate payouts to vendors & employees. Never run out of working capital. Get free access to world-class suite of applications to manage and monitor your finances.

Offer your customers the luxury of all payment modes including Credit/Debit cards, Netbanking, Wallets etc.

Join the 50,00,000+ businesses using Razorpay - https://bit.ly/3kHv4of

Add a comment

Anonymous on 15 Nov, 2021 Like 0 Dislike

Hey,

Earn $30 per month by investing 10 secs daily. Signup for hi .com using my link and earn daily $1 by answer a question. You get $1 when you signup and 50% of the earing made by your referrals. Signup here - https://bit.ly/3wJW3o1

Cheers, Aish

Add a comment

Anonymous on 14 Nov, 2021 Like 0 Dislike

Hey, I visited your site and I think that your content is amazing! It is really engaging and original, you must have worked so hard to generate such a quality content. We are ForeMedia and we help website owners with great websites to maximize the revenue they make from their website. I would love to buy Ad Spaces on your website and pay you per each impression of the ads on your site. We are Google Ad Exchange Premium partners and we work with more than 100 Ad Network & thousands of premium direct advertisers who would LOVE to buy Ads directly from your site and we can guarantee to increase your revenue by at least 45% compared to other advertising solutions you are currently using. You deserve to earn more for your content and maximize your earning potential and I will help you unlock that potential! There is no cost, you can register to our monetization platform for free on this link: https://foremedia.net/start I will be available for you on the Live Chat if you need any help, or you can email me back to: jenny@foremedia.net if you have any questions. I have at least 17 Premium Advertisers that have asked me to approach you because they would like to advertise on your website on Premium eCPM [cost per impressions] basis. Have a good day & feel free to ping me for any question! Click the link here for 1 minute registration to our platform [it's free!]: https://go.foremedia.net/u/start/

Add a comment

Anonymous on 14 Nov, 2021 Like 0 Dislike

Hey,

I am Aish K. I am sure you have heard about all the crazy surrounding cryptocurrency. Also about the dangers and volatility too. People have lost millions in crypto and also earned billions. Here is your chance to start your journey free and 100% safe without any fear of losing.

Join https://hi.com/ashkaps and earn $1 everyday free and more when your referrals join and then their referrals join.

Cheers, Aish

Add a comment

Anonymous on 14 Nov, 2021 Like 0 Dislike

Hey,

Earn upto assured $22.5 monthly when you use Presearch to do your browser searches. It's same as your favourite browser search engine and earns your free money without any extra effort. Moreover earn everytime one of your referrals join Presearch. It's simply great. Join here - https://bit.ly/3ouIGEr

Cheers, Aish

Add a comment

Anonymous on 13 Nov, 2021 Like 0 Dislike

Hey,

I am Aish K. I am sure you have heard about all the crazy surrounding cryptocurrency. Also about the dangers and volatility too. People have lost millions in crypto and also earned billions. Here is your chance to start your journey free and 100% safe without any fear of losing.

Join https://hi.com/ashkaps and earn $1 everyday free and more when your referrals join and then their referrals join.

Cheers, Aish

Add a comment

Anonymous on 13 Nov, 2021 Like 0 Dislike

Hey,

I am Aish K. I am sure you have heard about all the crazy surrounding cryptocurrency. Also about the dangers and volatility too. People have lost millions in crypto and also earned billions. Here is your chance to start your journey free and 100% safe without any fear of losing.

Join https://hi.com/ashkaps and earn $1 everyday free and more when your referrals join and then their referrals join.

Cheers, Aish

Add a comment

Anonymous on 24 Oct, 2021 Like 0 Dislike

Hey, The biggest monetizing mistake made by 59% bloggers and website owners is that they ignore the importance of having a monetizing plan. However, you can have a flawless monetizing plan for sure but to implement your strategy, you have to have a team of monetizing experts. Do you know 73% of successful small and medium size blogs and websites generating six figure income, partner with third party monetizing experts like Foremedia. It’s pretty simple! You put all your energy into adding valuable content on your website to engage your audience and Foremedia with the help of our Premium ADX License will transform your traffic into money. CTA:- Stop thinking, register yourself and start monetizing your website traffic from today https://bit.ly/foremedia-join Cheers

Add a comment

Anonymous on 2 Feb, 2021 Like 0 Dislike

import java.sql.* ;

public class ReadAndConnect{

public static void main(String[] args){

Statement statement ;

Connection connection ;

ResultSet resultset ;

try(

 connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/students", "username", "password") ;

statement = connection.createStatement() ;

resultset = statement.executeQuery("select id, name, address, dob, class from students where id < 100") ; 

){

int i = 0 ;

while(resultset.next()){

for(i = 0 ; i < 5; i++) System.out.printf("\t%s", resultset.getObject(i)) ;

System.out.println("") ;

}

}catch(Exception e){e.printStackTrace(); }

}

Add a comment


Add your answer