Friday, June 08, 2007

Do you know how to use AJAX in java?

Thursday, January 18, 2007

What is Event Handling in java?
Whenever some action is taking place on source a event is generated.
For eg:-When we ON the switch event is taking place.And the light glows.In this example light is Listener which is listening to event and the light is ON.

What is JIT in java?
JIT is Just in Time compiler whic his associated with JVM .JIT is used to execute the program faster and the whole program is not executed by JIT as Java perform various run time checks .Some part of program is executed by JIT and reamining code is interpreted.

What is exactly happening when we write System.out.println("Value of num is"+num);
num is integer type that gets converted to String type and then concatenation takes place.

Sunday, January 14, 2007

Can we write static public void main(String args[]) instead of [ublic satic void main(Strings args[]) in JAVA?

How to make infinite loop?
while(i!=i+0)

Can you call one constructor from another if a class has multiple constructor?
Ans) Yes,use this() syntax

What is stream?
Stream is flow of data.It is a abstraction that either consumes or produces information.A stream is linked to a phsical device by JAVA input output system.

What is Static inner class?
These class access the members of enclosing class through an object.That is it cannot refers members of its enclosing class directly.

What is inner class?
A class which is declared within another class is called nested class or inner class.
An inner class has access to the members including private members of the class in which it is nested.However the enclosing class donot have access to members of inner class.

What is Applet?
They are small java programs =.They are primararly used in interenet computer to another and run using the applet viewer or any web browser that support java.

What is throw in JAVA?
JVM throw the exception by default and if we want to explicitly throw the exception then we use throw.we must write a userdefined Exception class and extends Exception.In these class the constructor be public.Now we can throw our own Exception explicitly intead of throwing it implicitly by JVM.

What is Interface?
It is 100% generalised form.As we can't define a normal method in Interface.All methods are abstract and variables are by default public ,final and static.To define the abstract method that is present in interface the class should implements Interface.It is like a class but not a class.Object of Interface is not possible.

Friday, December 29, 2006

1)Do you know in java Programming when constructor are given return type then it acts as a normal function.And if static keyword is given before constructor then while compiling it ask for return type.If we give return type before static keyword then it acts like normal functions. 2)In every program we use public static void main but instead of that if we use public static void mian .That is instead of main we misspell as mian Do you know what will happen.Most of them will think it will not compile and execute.But this is not true.It will compile and generate error when it try to execute it.Reason is while it executes JVM start searching for main and as main is not present it generates error. 3)Anyone of you know How to find the size of object.And people will think as there is no sizeof operator in java we can't find.But this is not true.We can find the size of object with the class name Runtime.we have get the size by the using the code Runtime r= Runtime.getRuntime(); before and after the creation of the new objects you can check the memeory and by subtraction you can get the memory like sizeof operator in C. 4)how to write a Java application without a main methodclass MainMethodNot{static{System.out.println("Hello Java");System.exit(0);}}As there is no main method you will think how the program will compile and execute.But it will do.When it find static keyword it enter in the loop and print Hello Java and before JVM find main method it there is exit command and it terminates before searching main. 5)Do you konw in JVM there are 3 things.First is class Loader.Second is class Verifier.Third is Java Interpreter.class Loader loads the dot class file(.class) which contains bytecode and byte code means it doesnot have one's and zero format rather than bytecode is in form of assembly language. class verifier checks for errors and java Interpreter converts machine independent code to machine dependent code.And when we try to execute with keywordjava filename.the java invokes JVM and class Loader and the file is loaded in RAM.

i What is Exception?
People normally says Exception means errors but this is not the right answer.Exception means Unexpected results.The Syntax will be right in the program but the logic may go wrong.If we try to divide a number by zero than it will give error.When it executes it will give Arthimatic Exception error and the program will come out of the program.There are different type of keywords to handle this exceptions.First type is try and catch block.In try we will write the statements in the blocks and if any Exception occurs than the control will go to the catch block.Try and catch block can be nested also.Same like if and else.Another type is throws keyword using it after the method name.If there are any Exceptions in method than it will throw the appropriate exception.There are different type of Exception like Arthimatic Exception,Array out of bound Exception etc.These all exception are inside Exception class.

What is final keyword?
It is similar to constant in C.Once the value is defined the value can't be changed.If we try to change the value then the program does not executes.If the parent class is preceeded with final keyword than the base class cannot be inherited in derived class.If the method is preceeded with the keyword final than the method cannot be inherited in derived class.So we can restrict the method from overriding.

what is super keyword?
When we want to access the properties of base class at that time we use super keyword.If there are two classes A and B.And if B is inherting the properties of class A.And if we try to create a objects of derived class that is class B than after the oject is created it invokes the constructor of its own class that is class B.And after invoking if there are any statement written to print are not printed.As the control goes to constructor of class A.And if their we write any statement to print.The statement in constructor A gets printed and after printing all the statements in clas A the control goes back to class B constructor and statements in constructor B are printed.The reason for printing the constructor A statement first is when first time constructor of class B get invoke after the openning brackets inside the constructor there is super keyword which is implicitly called.So the control goes to constructor class A and the statement which is to printed are shown in console first.If we want to call the parmaterized constructor than we should pass paramaters inside the super keyword so that appropriate constructor is called.

Thursday, December 28, 2006

3)What is use this keyword?
ans)When a method contains a instance variable and local variable then local variable hides instance variable.To differentiate between the instance and local variable this keyword is used.
It is also used to invoke the constructor of its own class.

2)What is Garbage Collection?
ans)Object memeory deallocation take place at runtime by JVM.If the object lost the reference and the object is not needed in the application then garbage collector may or may not get invoked as garbage collector is having lower priority.

JAVA PROGRAMMING TIPS:-

1)What is mean by Exception?
ans)People normally says Exception means errors but this is not the right answer.Exception means unexpected results.For eg:-As we always have Expectation Indian will Win the cricket match.But India losses it many times.So the results are unexpected.
And Exception does not mean syntax errors .To handle Exception we use Try and catch keyword.Try contains blocks of statement and catch contains clause.Clause means ().When Exceptions are thrown from try block.It is recieved in catch block.In catch clause we write Exception names depending on the error may occur.

Wednesday, August 16, 2006

The one and only site where you get all information regarding all computer programming language.So why waste time just enjoy this site where you get detailed information about all programming tutorials like Visual Basic, VB.NET, Java, J2EE, C, C++, C#, ASP, ASP.NET, Perl, JavaScript, Web Services, and XML tutorials.Also you will find a few tutorials covering PHP, Cold Fusion, .NET Framework, HTML, and Python.


TUTORIALS
Assemblys
C
C++
Cobol
COLD Fusion
Delphi
HTML
J2EE
Java
Java Script
Perl
PHP
Python
Qbasic
SQL
VB6
XML
.Net Framework
Asp.Net
C#
Vb.Net
Web Services

GUIDANCES

Free E-books
MBA Entrance
Interview Question
Online Exams