Friday, October 22, 2010

PHP interview questions and answers

  1. What does a special set of tags do in PHP? - The output is displayed directly to the browser.
  2. What’s the difference between include and require? - It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
  3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem? - PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
  4. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example? - In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
  5. How do you define a constant? - Via define() directive, like define ("MYCONSTANT", 100);
  6. How do you pass a variable by value? - Just like in C++, put an ampersand in front of it, like $a = &$b
  7. Will comparison of string "10" and integer 11 work in PHP? - Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
  8. When are you supposed to use endif to end the conditional statement? - When the original if was followed by : and then the code block without braces.
  9. Explain the ternary conditional operator in PHP? - Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
  10. How do I find out the number of parameters passed into function? - func_num_args() function returns the number of parameters passed in.
  11. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? - 100, it’s a reference to existing variable.
  12. What’s the difference between accessing a class method via -> and via ::? - :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
  13. Are objects passed by value or by reference? - Everything is passed by value.
  14. How do you call a constructor for a parent class? - parent::constructor($value)
  15. What’s the special meaning of __sleep and __wakeup? - __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
  16. Why doesn’t the following code print the newline properly?
    Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters - and n.
  17. Would you initialize your strings with single quotes or double quotes? - Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
  18. How come the code works, but doesn’t for two-dimensional array of mine? - Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would’ve worked.
  19. What is the difference between characters �23 and x23? - The first one is octal 23, the second is hex 23.
  20. With a heredoc syntax, do I get variable substitution inside the heredoc contents? - Yes.
  21. I want to combine two variables together:
     $var1 = 'Welcome to ';
    $var2 = 'TechInterviews.com';

    What will work faster? Code sample 1:

    $var 3 = $var1.$var2;

    Or code sample 2:

    $var3 = "$var1$var2";

    Both examples would provide the same result - $var3 equal to "Welcome to TechInterviews.com". However, Code Sample 1 will work significantly faster. Try it out with large sets of data (or via concatenating small sets a million times or so), and you will see that concatenation works significantly faster than variable substitution.

  22. For printing out strings, there are echo, print and printf. Explain the differences. - echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:
     

    and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.

  23. I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP? - On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().
  24. What’s the output of the ucwords function in this example?
     $formatted = ucwords("TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS");
    print $formatted;

    What will be printed is TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS.
    ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.

  25. What’s the difference between htmlentities() and htmlspecialchars()? - htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
  26. What’s the difference between md5(), crc32() and sha1() crypto on PHP? - The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.
  27. So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()? - Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.
  28. How do you match the character ^ at the beginning of the string? - ^^
This entry was posted in Unix/Linux, Web dev. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

C# interview questions and answers

By Venkat |

  1. What’s the advantage of using System.Text.StringBuilder over System.String? StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.
  2. Can you store multiple data types in System.Array? No.
  3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? The first one performs a deep copy of the array, the second one is shallow.
  4. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods.
  5. What’s the .NET datatype that allows the retrieval of data by a unique key? HashTable.
  6. What’s class SortedList underneath? A sorted HashTable.
  7. Will finally block get executed if the exception had not occurred? Yes.
  8. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.
  9. Can multiple catch blocks be executed? No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.
  10. Why is it a bad idea to throw your own exceptions? Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
  11. What’s a delegate? A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.
  12. What’s a multicast delegate? It’s a delegate that points to and eventually fires off several methods.
  13. How’s the DLL Hell problem solved in .NET? Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.
  14. What are the ways to deploy an assembly? An MSI installer, a CAB archive, and XCOPY command.
  15. What’s a satellite assembly? When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
  16. What namespaces are necessary to create a localized application? System.Globalization, System.Resources.
  17. What’s the difference between // comments, /* */ comments and /// comments? Single-line, multi-line and XML documentation comments.
  18. How do you generate documentation from the C# file commented properly with a command-line compiler? Compile it with a /doc switch.
  19. What’s the difference between and XML documentation tag? Single line code example and multiple-line code example.
  20. Is XML case-sensitive? Yes, so and are different elements.
  21. What debugging tools come with the .NET SDK? CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.
  22. What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown.
  23. What does assert() do? In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
  24. What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
  25. Why are there five tracing levels in System.Diagnostics.TraceSwitcher? The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.
  26. Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor.
  27. How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger.
  28. What are three test cases you should go through in unit testing? Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
  29. Can you change the value of a variable while debugging a C# application? Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
  30. Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources).
  31. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it’s a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.
  32. What’s the role of the DataReader class in ADO.NET connections? It returns a read-only dataset from the data source when the command is executed.
  33. What is the wildcard character in SQL? Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.
  34. Explain ACID rule of thumb for transactions. Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions), Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t), Isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the data had been committed even if the system crashes right after).
  35. What connections does Microsoft SQL Server support? Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).
  36. Which one is trusted and which one is untrusted? Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.
  37. Why would you use untrusted verificaion? Web Services might use it, as well as non-Windows applications.
  38. What does the parameter Initial Catalog define inside Connection String? The database name to connect to.
  39. What’s the data provider name to connect to Access database? Microsoft.Access.
  40. What does Dispose method do with the connection object? Deletes it from the memory.
  41. What is a pre-requisite for connection pooling? Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.
This entry was posted in .NET. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Java Interview Questions1

Q:

What is the difference between an Interface and an Abstract class?

A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.
.

Q:

What is the purpose of garbage collection in Java, and when is it used?

A: The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used.

Q:

Describe synchronization in respect to multithreading.

A: With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchonization, it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to significant errors.

Q:

Explain different way of using thread?

A: The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cause when you are going for multiple inheritance..the only interface can help.

Q:

What are pass by reference and passby value?

A: Pass By Reference means the passing the address itself rather than passing the value. Passby Value means passing a copy of the value to be passed.

Q:

What is HashMap and Map?

A: Map is Interface and Hashmap is class that implements that.

Q:

Difference between HashMap and HashTable?

A: The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow). HashMap does not guarantee that the order of the map will remain constant over time. HashMap is unsynchronized and Hashtable is synchronized.

Q:

Difference between Vector and ArrayList?

A: Vector is synchronized whereas arraylist is not.

Q:

Difference between Swing and Awt?

A: AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.

Q:

What is the difference between a constructor and a method?

A: A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator.
A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.

Q:

What is an Iterator?

A: Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collection at the time the Iterator was obtained; generally it is not advisable to modify the collection itself while traversing an Iterator.

Q:

State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.

A: public : Public class is visible in other packages, field is visible everywhere (class must be public too)
private : Private variables or methods may be used only by an instance of the same class that declares the variable or method, A private feature may only be accessed by the class that owns the feature.
protected : Is available to all classes in the same package and also available to all subclasses of the class that owns the protected feature.This access is provided even to subclasses that reside in a different package from the class that owns the protected feature.
default :What you get by default ie, without any access modifier (ie, public private or protected).It means that it is visible to all within a particular package
.

Q:

What is an abstract class?

A: Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract itself, and must be declared as such.
A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.

Q:

What is static in java?

A: Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object. A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a nonstatic method. In other words, you can't change a static method into an instance method in a subclass.

Q:

What is final?

A: A final class can't be extended ie., final class may not be subclassed. A final method can't be overridden when its class is inherited. You can't change value of a final variable (is a constant).



Java Interview Questions

Similar Topics
Forum For Java Interview Questions new

Java Interview Questions
Java Collection Interview Questions
JSP Interview Questions
Servlet Interview Questions
EJB Interview Questions
JMS Interview Questions
Struts Interview Questions
DB Interview Questions


Java interview questions and answers

By Venkat |

  1. What is garbage collection? What is the process that is responsible for doing that in java? - Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process
  2. What kind of thread is the Garbage collector thread? - It is a daemon thread.
  3. What is a daemon thread? - These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly.
  4. How will you invoke any external process in Java? - Runtime.getRuntime().exec(….)
  5. What is the finalize method do? - Before the invalid objects get garbage collected, the JVM give the user a chance to clean up some resources before it got garbage collected.
  6. What is mutable object and immutable object? - If a object value is changeable then we can call it as Mutable object. (Ex., StringBuffer, …) If you are not allowed to change the value of an object, it is immutable object. (Ex., String, Integer, Float, …)
  7. What is the basic difference between string and stringbuffer object? - String is an immutable object. StringBuffer is a mutable object.
  8. What is the purpose of Void class? - The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.
  9. What is reflection? - Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions.
  10. What is the base class for Error and Exception? - Throwable
  11. What is the byte range? -128 to 127
  12. What is the implementation of destroy method in java.. is it native or java code? - This method is not implemented.
  13. What is a package? - To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability.
  14. What are the approaches that you will follow for making a program very efficient? - By avoiding too much of static methods avoiding the excessive and unnecessary use of synchronized methods Selection of related classes based on the application (meaning synchronized classes for multiuser and non-synchronized classes for single user) Usage of appropriate design patterns Using cache methodologies for remote invocations Avoiding creation of variables within a loop and lot more.
  15. What is a DatabaseMetaData? - Comprehensive information about the database as a whole.
  16. What is Locale? - A Locale object represents a specific geographical, political, or cultural region
  17. How will you load a specific locale? - Using ResourceBundle.getBundle(…);
  18. What is JIT and its use? - Really, just a very fast compiler… In this incarnation, pretty much a one-pass compiler — no offline computations. So you can’t look at the whole method, rank the expressions according to which ones are re-used the most, and then generate code. In theory terms, it’s an on-line problem.
  19. Is JVM a compiler or an interpreter? - Interpreter
  20. When you think about optimization, what is the best way to findout the time/memory consuming process? - Using profiler
  21. What is the purpose of assert keyword used in JDK1.4.x? - In order to validate certain expressions. It effectively replaces the if block and automatically throws the AssertionError on failure. This keyword should be used for the critical arguments. Meaning, without that the method does nothing.
  22. How will you get the platform dependent values like line separator, path separator, etc., ? - Using Sytem.getProperty(…) (line.separator, path.separator, …)
  23. What is skeleton and stub? what is the purpose of those? - Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK.
  24. What is the final keyword denotes? - final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more.
  25. What is the significance of ListIterator? - You can iterate back and forth.
  26. What is the major difference between LinkedList and ArrayList? - LinkedList are meant for sequential accessing. ArrayList are meant for random accessing.
  27. What is nested class? - If all the methods of a inner class is static then it is a nested class.
  28. What is inner class? - If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class.
  29. What is composition? - Holding the reference of the other class within some other class is known as composition.
  30. What is aggregation? - It is a special type of composition. If you expose all the methods of a composite class and route the method call to the composite method through its reference, then it is called aggregation.
  31. What are the methods in Object? - clone, equals, wait, finalize, getClass, hashCode, notify, notifyAll, toString
  32. Can you instantiate the Math class? - You can’t instantiate the math class. All the methods in this class are static. And the constructor is not public.
  33. What is singleton? - It is one of the design pattern. This falls in the creational pattern of the design pattern. There will be only one instance for that entire JVM. You can achieve this by having the private constructor in the class. For eg., public class Singleton { private static final Singleton s = new Singleton(); private Singleton() { } public static Singleton getInstance() { return s; } // all non static methods … }
  34. What is DriverManager? - The basic service to manage set of JDBC drivers.
  35. What is Class.forName() does and how it is useful? - It loads the class into the ClassLoader. It returns the Class. Using that you can get the instance ( “class-instance”.newInstance() ).
  36. Inq adds a question: Expain the reason for each keyword of
    public static void main(String args[])
This entry was posted in Java, Networking. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Core Java Interview Questions

How does garbage collector decide which objects are to be removed? Can garbage collector be forced?

Explain the purpose of 'JDK','JRE',LIB' directories.
View Question | Asked by : rjk1203

Give an example of using clone to create an object.
Latest Answer: We can create an object by using clone() method which is a object class method.Create an object like MyClass obj=new MyClass();CloneClass cloneobj=(CloneClass)obj.clone();By this way you can create a copy of an object using obj.clone() method.But you ...

Explain what is superclass reference to subclass object? Why do we go for downcasting?
Latest Answer: superclass classname=new subclass() ...

If Overloading is not going to help to increase performance then why we need to use same name for different methods?

Why spring is considered as light weight & why EJB is heavy weight?

Explain how a WeakHashMap works?
Latest Answer: You put an entry in a WeakHashMap with the object as the key, and the extra information as the map value. Then, as long as you keep a strong reference to the object, you will be able to check the map to retrieve the extra information. And once you ...

What are the code standard used in J2EE project in real time?
Latest Answer: Give proper name for the variable, it has to describe it functions or process. Follow coding standards ...

Explain readLine function in Core Java.
Latest Answer: Actually the readLine() method will reads the data through the bufferdReader object. It reads only one line of data through keyboard. We can't enter the multiple lines of data at runtime.This is the main functionality of the readLine() method. ...

If more than one class is present in one Java file then what will be the java file name?
Latest Answer: If there are more than one class in a java file there is no need of main() in those classeswe can save the file with one of the names of classes.we can compile them but we cant run them.if we want to run them we need a main() with public access specifier ...

View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Ask A Question
Go Top

JDBC Interview Questions

JDBC Interview Questions
Here you can find out a list of interview questions for JDBC. These questions are often asked by the interviewer for JDBC (Java Database Connectivity) interview. We put our maximum effort to make this answers error free. But still there might be some errors. If you feel out any answer given for any question is wrong, please, please inform us by clicking on report bug button provided below.

In this section we are offering interview questions for JDBC only. if you need interview questions for any other java related technologies , please check the relevant sections.

1 Q What is JDBC?
A

JDBC technology is an API (included in both J2SE and J2EE releases) that provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. With a JDBC technology-enabled driver, you can connect all corporate data even in a heterogeneous environment

2 Q What are stored procedures?
A

A stored procedure is a set of statements/commands which reside in the database. The stored procedure is precompiled. Each Database has it's own stored procedure language,

3 Q What is JDBC Driver ?
A The JDBC Driver provides vendor-specific implementations of the abstract classes provided by the JDBC API. This driver is used to connect to the database.

4 Q What are the steps required to execute a query in JDBC?
A First we need to create an instance of a JDBC driver or load JDBC drivers, then we need to register this driver with DriverManager class. Then we can open a connection. By using this connection , we can create a statement object and this object will help us to execute the query.

5 Q What is DriverManager ?
A DriverManager is a class in java.sql package. It is the basic service for managing a set of JDBC drivers.

6 Q What is a ResultSet ?
A A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

7 Q What is Connection?
A Connection class represents a connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.

A Connection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.

8 Q What does Class.forName return?
A A class as loaded by the classloader.

9 Q What is Connection pooling?
A Connection pooling is a technique used for sharing server resources among requesting clients. Connection pooling increases the performance of Web applications by reusing active database connections instead of creating a new connection with every request. Connection pool manager maintains a pool of open database connections.

10 Q What are the different JDB drivers available?
A There are mainly four type of JDBC drivers available. They are:

Type 1 : JDBC-ODBC Bridge Driver - A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence, this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. For information on the JDBC-ODBC bridge driver provided by Sun.

Type 2: Native API Partly Java Driver- A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.

Type 3: Network protocol Driver- A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products.

Type 4: JDBC Net pure Java Driver - A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress.

11 Q What is the fastest type of JDBC driver?
A

Type 4 (JDBC Net pure Java Driver) is the fastest JDBC driver. Type 1 and Type 3 drivers will be slower than Type 2 drivers (the database calls are make at least three translations versus two), and Type 4 drivers are the fastest (only one translation).

12 Q Is the JDBC-ODBC Bridge multi-threaded?
A

No. The JDBC-ODBC Bridge does not support multi threading. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading.

13 Q What is cold backup, hot backup, warm backup recovery?
A

Cold backup means all these files must be backed up at the same time, before the database is restarted. Hot backup (official name is 'online backup' ) is a backup taken of each tablespace while the database is running and is being accessed by the users

14 Q

What is the advantage of denormalization?
A

Data denormalization is reverse procedure, carried out purely for reasons of improving performance. It maybe efficient for a high-throughput system to replicate data for certain data.

15 Q How do you handle your own transaction ?
A Connection Object has a method called setAutocommit ( boolean flag) . For handling our own transaction we can set the parameter to false and begin your transaction . Finally commit the transaction by calling the commit method.

Tuesday, October 12, 2010

Top 10 Motorcycle Game

by Venkatesh on Oct 12, 2010

Games have crossed its limits and is spreading like a deadly virus round the globe. Some play it for entertainment, some are addicted to it and rest makes it their lives. Some of the actions are too much admired by us that we use to try and do it in our daily life. Here is the list of top 10 motorcycle games one love to play and put the stunts in their lives.



MotorStorm

The world’s most brutal off-road racing event where the goal is to win at all costs is MotorStorm. The particle effects of MotorStorm are simply amazing. You’ll notice more and more mud accumulating on the vehicles as you race that makes you seem like none except you are driving and the tire tracks stay on the tracks for the duration of the game. The game even manages to throw in superb crashes, excellent lighting, and remain at a constant frame rate.

<span class=MotorStorm" width="462" height="352">

Motocross Maniacs

Motocross Maniacs puts you on the seat of a miniscule motorcycle throughout 8 different, gravity-defying side-scrolling courses that happen to be available right from the start. Those who made there biking their soul, it is the perfect game to play. Reaching the finish line before the time runs out is the only rule, more often than not by staying off the ground as much as possible and making good use of elevated platforms and ramps as the most effective and quickest way to the goal.

<span class=Motorcross Maniacs 2 " width="460" height="216">

Project Gotham Racing 4

With 2005′s Project Gotham Racing 3, Bizarre Creations stepped in a new era of racing on the Xbox 360 with a game that continued the long-standing quality of its Project Gotham series with amazing graphics and extensive online options that makes every user happy to play. The continued series of Project Gotham Racing brings tradition of brilliant visuals and fun gameplay, and adds to the list with new rides and weather effects that must be driven to be believed.

Project Gotham Racing 4

Grand Theft Auto: Vice City

It’s true that ones you start playing this game you will never think of other game. This game can includes missions, adventure, stunts and much more to count. In short brief Tommy Vercetti i.e. you make all the missions and at last get to know that your friend Lance was behind all the evil practice. Sorry to tell you the thrilling part but there are much more part to enjoy in the game such as you can earn money while doing stunts and the list goes on.

<span class=Gta Vice City" width="462" height="329">

Motocross Madness

Motocross Madness 2 is seemed to be a good successor of the original, and with the dearth of dirt bike racing games on the market, it’s great to see such a fleshed out, polished racer hit the PC. It definitely dances the dangerous line between arcade and sim, but if you like big heights, fast corners and horrific crashes (and who doesn’t?) then it is the perfect entertainer game for you all.

<span class=Motorcross Madness 2 " width="462" height="352">

MotoGP 2

MotoGP 2 for Xbox and Xbox LIVE comes in eight different racing modes including: Stunt, GP, time trial, Training challenges, tag, Live, multi-player & single race, customizable bikes and all of the riders from the real 2002 MotoGP class. Beside these the additional features surrounding MotoGP 2 is that Players can create custom riders and race them online at 60 frames per second with up to 16 riders on one track during a single race. Players can also utilize Microsoft’s online voice communication to talk trash with the nearest competitor at speeds that will make their voices crack and their knees buckle. Thus MotoGP 2 is quite good to have fun and acts as a complete package for your entertainment.

<span class=MotoGP 2" width="462" height="352">

Road Rash

Road Rash is a series by Electronic Arts. The game’s title is based on the slang term for the severe friction burns that can occur in a motorcycling fall where skin comes into contact with the ground at high speed. Players could choose between three categories of motorcycles in each price level: Sport/GT bikes, Race replicas and Cruisers and set off there battle of race.

Road Rash Game

Superbike World Championship

Speed, courage and adrenaline: live again the extreme challenge of the Superbike World Championship thanks to the fully renewed experience offered by SBK X. Whether you’re keen on 100% realistic races or you simply want to gas your bike, SBK X tries to give you best comfort. Along with the Simulation mode – completely customizable – you will find the brand new Arcade mode to start skidding, tailing, and wheeling like a real ace of biking.

<span class=Superbike World Championship game" width="454" height="308">

3D Deathchase

3D Deathchase is a 1983 computer game written for the ZX Spectrum by Mervyn Estcourt and published by Micromega in the UK and Ventamatic in Spain. 3D Deathchase received a positive reaction from the gaming press. A contemporary review in the ZXSpectrum gaming magazine CRASH described 3D Deathchase as “an extremely simple idea for a game, and utterly compelling to play” and awarded the game 92%.Thus no other explanations might be required for the 3D Deathchase. So it’s better to play and then believe the words.

3d <span class=DeathChase" width="384" height="388">

Super Hang-On

Super Hang-On was released in 1989 for the Sega Genesis and was one of the first motorcycle racing games ever released for that system. The graphics in SHO were amazing for their time and they hold up quite well today. The characters and motorcycles are huge. The tracks themselves are beautiful, they are very colorful and are full of life and can make easily a new user to fall in love with this game.

Super Hang-On