Showing posts with label FRESHERS. Show all posts
Showing posts with label FRESHERS. Show all posts

Sunday, March 21, 2010

JAVA interview Basic questions and answers for freshers

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.

Saturday, March 20, 2010

Java Program for intializing and printing a Two-dimensional array

public class Twoarray
{
    public static void main(String args[])
    {
        int a[][]={{5,2},{1,4},{2,3}};
    System.out.println("given Two-dimensional array is: ");
        for(int i=0;i<3;i++)
        {
            for(int j=0;j<2;j++)
            {
                System.out.print(a[i][j]);
            }
        System.out.print(" ");
        }
    }
}

Java Program for printing the Fibonacci Series

class Fibonacci
{
 public static void main(String[] args)
 {
 int a=0,b=1,s=0;      
 System.out.println("Fibonacci series printing 10times:"); System.out.println(a);
 System.out.println(b);
 int i=0;
 while(i<10)
     {
            s=a+b;
            a=b;
            b=s;
            System.out.println(s);
            i++;
            }
    }
}

Friday, March 19, 2010

JAVA Program for Bubblesort (Ascending order) of a Single Dimensional Array

class Bubblesort
{
            public static void main(String[] args)
    {
        int a[]={4,1,8,3,5};
        int temp=0;
        System.out.println("given array: ");
        for(int j=0;j<5;j++)
        {
                System.out.print(a[j]);
        }
        System.out.println("");
        System.out.println("Bubble sort for ascending order");
        for(int j=0;<(a.length-1);j++)
        {
            for(int i=0;<(a.length-1);i++)
            {
                if(a[i]>a[i+1])
                {
                    temp=a[i];
                    a[i]=a[i+1];
                    a[i+1]=temp;
                }
               
            }
        }
            System.out.println("the sorted array is:");
            for(int k=0;k<5;k++)
        {
                System.out.print(a[k]);
        }
    }
}

JAVA Program to Print the season of a given month

public class Season
{
public static void main(String[] args)
{
int month=4;
switch(month)
{
case 1:
case 2:
case 3:
System.out.println("Automn");
break;
case 4:
case 5:
case 6:
System.out.println("summer");
break;

case 7:
case 8:
case 9:
System.out.println("winter");
break;
case 10:
case 11:
case 12:
System.out.println("spring");
break;
default:
System.out.println("Wrong input");

}
}
}
Download this program Here

JAVA Program to to find whether the given number is Armstrong or not

class Armstrong
{
public static void main(String[] args)
{
int n=143,temp,a=0,i=1;
temp=n;
while(i>0)
{
i=n%10;
a=(i*i*i)+a;
n=n/10;
}
if(a==temp)
System.out.println("the given number is armstrong");
else
System.out.println("the given number is not armstrong");
}
}
Download this program Here

JAVA Program to Print he Default Values

class Defaultvalues
{
static int a;
static byte b;
static char c;
static short s;
static long l;
static float f;
static double d;
static boolean bl;
public static void main(String[] args)
{
 System.out.println("Default values of various data types");
  System.out.println("int: "+a);
System.out.println("byte: "+b);
System.out.println("char: "+c);
System.out.println("short: "+s);
System.out.println("long: "+l);
System.out.println("float: "+f);
System.out.println("double: "+d);
System.out.println("boolean: "+bl);
}
}
Download this program Here

Monday, February 1, 2010

Avoid the Top 10 Interview Mistakes

The best way to avoid the most common and dangerous interview mistakes is to think ahead and decide not to make them... Read on for a whistle-stop tour of the top ten interview clangers!

1. Lying
Although it's tempting, it doesn't work. By all means gloss over the unflattering things. But out-right fibbing NEVER pays.

Mark Twain said: "If you tell the truth, you never have to remember anything." Think about it. They will catch you out later.

2. Slating your current company or boss
Fed up with your current job and would give anything to leave because they've treated you badly? Your job interview is NOT the time to seek revenge. Bear in mind that the interviewer will be listening to your answers and thinking about what it would be like to work with you. Ask yourself: do you like working with people who constantly criticise others? Isn't it a bit wearing? The trouble is that the interviewer draws massive conclusions from your answers. So your throwaway comment about your boss or employer may be interpreted to be your "standard" way of thinking. It makes you look bad, not your employer.

Saturday, January 23, 2010

Tuesday, September 22, 2009

Corporates look for...........

Freshers with........
  1. Strong Fundamentals -- technically sound...
  2. Performance
  3. Passion towards work
  4. Communication skills (verbal & Non verbal)
  5. High level of confidence
  6. effective Interpersonal skills
  7. Willingness to learn
  8. Short learning curve
  9. Creativity
  10. Innovation
  11. Reliablity
  12. Attitude to work
  13. Smart and Hard work
  • Specific
  • Measurable
  • Acheivable
  • Realistic
  • Time bound