- Q1: How can we store the information returned from querying the database? and if it is too big, how does it affect the performance? In Java the return information will be stored in the ResultSet object. Yes, if the ResultSet is getting big, it will slow down the process and the performance as well. We can prevent this situation by give the program a simple but specific query statement.
- Q2: What is index table and why we use it? Index table are based on a sorted ordering of the values. Index table provides fast access time when searching.
- Q3: In Java why we use exceptions? Java uses exceptions as a way of signaling serious problems when you execute a program. One major benefit of having an error signaled by an exception is that it separates the code that deals with errors from the code that is executed when things are moving along smoothly. Another positive aspect of exceptions is that they provide a way of enforcing a response to particular errors.
- Q4: Write a code in Perl that makes a connection to Database.
#!/usr/bin/perl #makeconnection.pl use DBI; my $dbh = DBI->connect('dbi:mysql:test','root','foo')||die "Error opening database: $DBI::errstrn"; print"Successful connect to databasen"; $dbh->disconnect || die "Failed to disconnectn"; - Q5: Write a code in Perl that select all data from table Foo?
#!usr/bin/perl #connect.pl use DBI; my ($dbh, $sth, $name, $id); $dbh= DBI->connect('dbi:mysql:test','root','foo') || die "Error opening database: $DBI::errstrn"; $sth= $dbh->prepare("SELECT * from Foo;") || die "Prepare failed: $DBI::errstrn"; $sth->execute() || die "Couldn't execute query: $DBI::errstrn"; while(( $id, $name) = $sth->fetchrow_array) { print "$name has ID $idn"; } $sth->finish(); $dbh->disconnect || die "Failed to disconnectn";
-
Job Interview Question Articles
- C# Interview Questions and Answers
- QTP Interview Questions and Answers
- C++ Interview Questions and Answers
- PHP Interview Questions and Answers
- XML Interview Questions and Answers
- JavaScript Interview Questions and Answers
- Asp.Net Interview Questions and Answers
- J2EE Interview Questions and Answers
- ABAP Interview Questions and Answers
- Perl Interview Questions and Answers
- Java Interview Questions and Answers
-
Resources
- Technology Question and Answer Website
- How to dance around the salary-expectation question
- 10 mistakes managers make during job interviews
- ID Maker
- Stupid interview questions
- How to Answer These Tricky Interview Questions
- Seven tips for writing an online profile for LinkedIn, MySpace or Facebook
- Video surveillance
- Laptop computers
- Affordable life insurance
- Ink cartridges
-
Tutorials
-
RSS Feeds

One Comment on Java and Perl Web programming interview questions
What is a glorified coma in perl?