answersLogoWhite

0

Definitely Yes. All Java applications that need to connect to a database (it can be any db - oracle or sybase or sql server or db2 or anything else as well) use a java class to create database connections.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you write concrete method inside abstract class?

There is no difference with method declaration and implementation between abstract and non-abstract classes. You do the exact same thing when writing a concrete method in either an abstract or non-abstract class.


What is the purpose of method overriding?

Assuming class A has a method named getXXX() and class B is a sub class of class A. Now, if we write a method with the same name getXXX() in class B, with exactly the same signature as class A, it is called overriding a method. The method getXXX() in class A becomes the overridden method.


Can a class write inside an interface?

Yes, you can create a static class inside an interface, but it is normally not a good idea.


Which method of object output streme class can be used to write the cotents of an object to a file?

write object


How do you write abstract on vbnet language?

Mark a class as MustInherit and at least one method as MustOverride.


Why do you need to override the toString method?

By default every class you write inherently extends the base Object class. This has a basic toString() method which merely returns the name of the class followed by a hex representation of the hash value. By overriding this method, you can return a more meaningful value specific to your class, such as member attributes and their values.


What is function overriding in Java?

Method overriding is similar to method overloading, with a small difference. In overriding, a method in a parent class is overridden in the child class. The method in the child class will have the same signature as that of the parent class. Since the method in the child class has the same signature & name as the method of its parent class, it is termed as overriding. In situations where you may have to explicitly call the parent class method you can use the "super" keyword and for explicitly calling the current objects method you can use the "this" keyword.


What is the basic need of method overwritting in JAVA?

Maybe what you mean is method over loading. And that basically means that you can write different methods with the same name, which for example will allow you to call a method with few parameters, and let tat method fill the default values for the real thing. Sample private String my_method (String a, Integer b, SomethingElse c) { do your stuff... return "I did it"; } private String my_method (String a) { Integer defaultB = new Integer (5); SomethingElse defaultC = new SomethingElse (); return (my_method (a, defaultB, defaultC)); } .... // You can call: System.out (my_method("Who did that?")); There is no concept of Method Overwriting in Java. We have Method overloading & method Overriding. Overloading is already explained. If you are asking about Method Overriding pls read on... Overriding is a feature in Java where you can override (mask) the features of the parent class in the child class. Lets say you have a method printName() in the parent class which prints the name of that class. When you extend this class in a child class if you call the method printName() the name of the parent would be displayed. Which you may want to change. If you want to display only the name of the child class then you can write the method printName() in the child class. On invocation the name of the child class would be printed. Tip: If you want to display the name of the parent class somewhere you can invoke it by using super.printName() because once you override that method in the child class you cannot access the parent class method directly.


Write a Java Program to find occurences of given word in a text?

Check the documentation of the String class, for a method that searches for a substring.


How do you invoke static methods?

if some method is static, then you can not call that method through the oobject of that class. but the name of the class. let us see a example: class Test { int a; int b; static void show() { System.out.println("we are in show"); } } class Main { public static void main(String args[]) { Test t=new Test(); t.show();\\thiss is an erroraneous code. because, the method "show()" is static. Test.show();\\this is correct } Arnas Sinha


Can you write on the chalkboard for the class?

Yes, I can write on the chalkboard for the class.


Explain any 8 difference between overloading and overriding?

Overriding methods that are in the parent class is to redefine them in the current (child) class in a different way. Like if you're extending a class but you don't like the behavior of one method in that class, you can override that method and write your own code. Overloading a method in the current class is defining another copy of the method with different signature. They call them overloaded methods. This is an example of overloaded methods: myMethod(int i, int b){ .... } myMethod(String s) { ... } myMethod(boolean b) {...} Hope that was clear