Skip to main content

Posts

Showing posts from June, 2010

How to Create a TAR file ?

tar is a facility in Linux that creates archived file using a set of files. One file will be created that contains all the files in it. But do not get misunderstand, ".tar" file is not a compressed file. It is only a collection of files within a single uncompressed file. TAR 1. Create tar archive $ tar -cf tarFileName.tar file1 file2 file3 This will create an achive named tarFileName.tar and that will include the files specified there (ie: file1, file2, file3). 2. View the list of files $ tar -tf tarFileName.tar This will list the details of the files inside the archive. 3. Extract tar archive $ tar -xf tarFileName.tar This will extract the archive and create the files that were inside the archive. The above options have the meanings as: c - create an archive f - archive file t - list the content of the archive x - extract an archive GZIP If the file is a ".tar.gz" or ".tgz" file it is a collection of files that is compressed. To compr

The Essential Steps to create your own Website

This tutorial shows you how to make or create a website. It is intended for the beginner and layperson, taking you step by step through the whole process from the very beginning. It makes very few assumptions about what you know (other than the fact that you know how to surf the Internet, since you're already reading this article on the Internet). Since some steps are more involved, it also links to selected relevant articles on thesitewizard.com that you will need to click through to read for more information. < http://www.thesitewizard.com/gettingstarted/startwebsite.shtml >

Just Technical Skills are Enough for Interview..???

Are technical skills alone or just being a quiet achiever sufficient to boost your career? The answer is no. The technical, analytical and problem solving skills must be complemented with: Effective marketing skills to promote your skills, knowledge, and achievements along with ability to negotiate your promotions, salary or contract rates. Now days it is a rarity for management to pro-actively recognize or reward their staff unless there is an immediate vacancy to fill. If you cannot determine your net worth, how the management can? Effective communication, interpersonal, presentation, mentoring, being a team player and business skills. I have seen candidates with technical, analytical and/or problem solving brilliance getting either sacked or failing to make a mark in their careers due to lack of one or more of the above mentioned skills.

Java Packages Interview Questions

Do I need to import java.lang package any time? Why? Or Which package is always imported by default? No. It is by default loaded internally by the JVM. The java.lang package is always imported by default. Can I import same package/class twice? Will the JVM load the package twice at runtime? One can import the same package or same class multiple times. Neither compiler nor JVM complains anything about it. And the JVM will internally load the class only once no matter how many times you import the same class. Does importing a package imports the sub packages as well? E.g. Does importing com.bob.* also import com.bob.code.*? No you will have to import the sub packages explicitly. Importing com.bob.* will import classes in the package bob only. It will not import any class in any of its sub package’s. What is a Java package and how is it used? Or Explain the usage of Java packages. A Java package is a naming context for classes and interfaces. A package is used to create a se

Core Java Interview Questions

1)What is OOPs? Ans: Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling access to code. 2)what is the difference between Procedural and OOPs? Ans: a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOPs program, unit of program is object, which is nothing but combination of data and code. b) In procedural program,data is exposed to the whole program whereas in OOPs program,it is accessible with in the object and which in turn assures the security of the code. 3)What are Encapsulation, Inheritance and Polymorphism? Ans: Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse.Inheritance is the process by which one object acquires the properties of another object.Polymorphism is the f

Java Wrapper Classes

What are Wrapper Classes? Describe the wrapper classes in Java. Wrapper classes are classes that allow primitive types to be accessed as objects. Wrapper class is wrapper around a primitive data type. Following table lists the primitive types and the corresponding wrapper classes: Primitive    Wrapper Boolean     java.lang.Boolean Byte          java.lang.Byte Char          java.lang.Character double       java.lang.Double Float         java.lang.Float Int            java.lang.Integer Long          java.lang.Long Short         java.lang.Short Void          java.lang.Void

JDBC Interview Questions

1. What’s the JDBC 2.0 API? The JDBC 2.0 API is the latest update of the JDBC API. It contains many new features, including scrollable result sets and the new SQL:1999 (formerly SQL 3) data types. There are two parts to the JDBC 2.0 API: the JDBC 2.0 core API (the java.sql package), which is included in the JavaTM 2 SDK, Standard Edition the JDBC 2.0 Optional Package API (the javax.sql package), which is available separately or as part of the Java 2 SDK, Enterprise Edition 2. Does the JDBC-ODBC Bridge support the new features in the JDBC 2.0 API? No, the JDBC-ODBC Bridge that is included in the Java 2 Platform initial release does not support the new features in the JDBC 2.0 API. However, Sun and Merant are working to produce a new version of the Bridge that does support the new features. Note that we do not recommend using the Bridge except for experimental purposes or when you have no other driver available. 3. Can the JDBC-ODBC Bridge be used with applets? Use of the JDBC-OD

Choosing the Most Specific Method - Tricky Overloading

Choosing the Most Specific Method - Tricky Method Overloading Let's start with looking at a code-segment and try to think of the output/error, it would produce when compiled/executed and subsequently we'll discuss the behavior of code. public class NullTest {    public static void method(Object obj){      System.out.println("method with param type - Object");    }      public static void method(String obj){      System.out.println("method with param type - String");    }      public static void main(String [] args){      method(null);    } } So, what do you expect as the output here? Before thinking about the output, do you really expect the code to compile successfully? Well... yeah, the code will compile and run fine as opposed to anyone who might have sensed an ambiguity here - we'll see the reason soon. Object ' or the one with parameter type ' String ' and why? Of course, the compiler can't bind two

What is Domain Object ? (Part-2)

  Building the Domain Object This section will take you step by step through the process of building a domain object. Starting the Class A domain object starts off as a standard Java class that extends one of the four domain object base classes. Because of the auditing and permissioning requirements, AuditedACSObject is the base class. package com.arsdigita.notes;   import com.arsdigita.db.Sequences; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.auditing.AuditedACSObject; import com.arsdigita.kernel.Stylesheet; import com.arsdigita.kernel.User;                            import com.arsdigita.persistence.DataAssociation; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.PersistenceException; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.metadata.ObjectType;   import java.math.BigDecimal; import java.sql.SQLException; import java.util.Date; // Stylesheets import java.util.Locale; import java.util.Arr