Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

Java Questions & Java FAQ

                         

In this Java Question series we have listed the Java Questions which are commonly asked. Our collection of frequently asked questions (FAQ) will provide you brief answers to many common questions about the Sun Programming Language. 

Here are the list of those Java Questions and FAQs.

  1. Question: It is said that the code in a finally clause will never fail to execute, Is there any example where it fails to execute?
    Answer: Here is the example code where the finally clause code will not execute.
      public class testFinally{
    
    	public static void main(String[] args){
    		System.out.println("Executing the program");
    		  try {
    			System.out.println("In the try block");
     		        System.exit(1);
                            } finally {
    			System.out.println("In the finally.");
    
    		      }
    	     }
         }
                 

    Download the code
       

  2. Question: Why there are no global variables in Java?
    Answer: Global variables are globally accessible. Java does not support globally accessible variables due to following reasons: 
    * The global variables breaks the referential transparency
    * Global variables creates collisions in namespace.
       
  3. Question: What platforms is the Java-technology software available on?
    Answer: Sun provides ports of the Java 2 Platform for Windows 95, Windows 98, Windows NT, Windows 2000, Solaris-SPARC, Solaris-Intel, and Linux.
       
  4. Question: Where can I download latest version of Java?
    Answer: Latest version of JDK can be downloaded from Sun web site http://www.java.sun.com
       
  5. Question: Do I need to know C++ to learn Java?
    Answer: No, you don't need to know C or C++ to learn Java. Java is much simpler that C++.
       
  6. Question: What is the difference between Java and Java Script?
    Answer: In Java and Java Script only the "Java" word is common. Java is programming language from Sun. JavaScript is a programming language from Netscape, which runs in their browsers.
      
  7. Question: Differentiate between applet and application.
    Answer: Java applications runs as stand-alone application whereas applet runs in web browser. Application is a Java class that has a main() method. Applet class extends java.applet.Applet class.
       
  8. Question: How to convert String to Number in java program?
    Answer: The valueOf() function of Integer class is is used to convert string to Number. Here is the code example:
    String strId = "10";

    int id=Integer.valueOf(strId);
      

  9. Question: What is interface?
    Answer:
    In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.
    Example of Interface:
    public interface sampleInterface {
        public void functionOne();

        public long CONSTANT_ONE = 1000;
    }

      
  10. Question: How you can force the garbage collection?
    Answer: Garbage collection automatic process and can't be forced.
     

                         

Useful Links
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.