1. | What is VSS (Visual Source Safe) ? |
| You can use VSS to secure code access among the developer and make control over the access right, also can check for multiple version of code. |
2. | Assume you have an array that contains a number of strings (perhaps char * a[100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams within the array (two words are anagrams if they contain the same characters; for example, tales and slate are anagrams.) |
| Begin by sorting each element in the array in alphabetical order. So, if one element of your array was slate, it would be rearranged to form aelst (use some mechanism to know that the particular instance of aelst maps to slate). At this point, you slate and tales would be identical: aelst. Next, sort the entire array of these modified dictionary words. Now, all of the anagrams are grouped together. Finally, step through the array and display duplicate terms, mapping the sorted letters (aelst) back to the word (slate or tales). |
3. | What is the difference between a NULL pointer and a void pointer? |
| A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer to an object of an unknown type, and is guaranteed to have enough bits to hold a pointer to any object. A void pointer is not guaranteed to have enough bits to point to a function (though in general practice it does) |
4. | What is encapsulation technique? |
| Hiding data within the class and making it available only through the methods. This technique is used to protect your class against accidental changes to fields, which might leave the class in an inconsistent state. |
5. | Definition of Object Oriented Programming in single line? |
| Object oriented programming is a programming paradigm which uses objects and its interactions to design applications and computer programs. |
6. | What is virtual function? |
| The virtual keyword means that method, property or function can be overridden |
7. | What’s a Windows process? |
| It’s an application that’s running and had been allocated memory. |
8. | What is programming? |
| Computer programming is writing or editing a computer program. A computer program is a set of instructions which determine how the computer will react to input when that program is running. |
9. | What is a debugger? |
| debugger is a program in which you run another program that you are trying to debug. Inside a debugger, you can step through your program one line or instruction at a time, set break points and have your program run until it hits one, examine the contents of variables and memory, and such other useful things as that. |
10. | what is a Programming language? |
| A programming language is a stylized communication technique intended to be used for controlling the behavior of a machine (often a computer). Like human languages programming languages have syntactic and semantic rules used to define meaning. |
11. | What's the difference between a programming language, a scripting language? |
| The main difference between a "programming language" (C, C++ etc.) and a "scripting language" (ASP, JSP, JavaScript, VBScript) is that code written in a programming language needs to be compiled before it is run. Once it is compiled, it can be run any number of times. Scripting languages, on the other hand, are interpreted at run-time. This means that every time you want to run the program, a separate program needs to read the code, interpret it, and then follow the instructions in the code. Compiled code has already been interpreted into machine language, so it is will typically execute faster because the conversion into machine language has already been done. |
Showing posts with label gui java. Show all posts
Showing posts with label gui java. Show all posts
Thursday, September 8, 2011
Interview Questions for Programming General
Labels:
c projects,
c++,
dot net,
general programming,
gui java,
Interview Questions,
language,
programming
Friday, July 16, 2010
JWindow
JWindow
Java Swing Tutorial Explaining the JWindow Component. JWindow is
Swing’s version of Window and is descended directly from that class. Like
Window, it uses BorderLayout by default. Almost all Swing components are
lightweight except JApplet, JFrame, JDialog, and JWindow.

Class JWindow
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
BasicToolBarUI.DragWindow, Dialog, Frame, JWindow
Window(Frame owner)
Constructs a new invisible window with the specified Frame as its owner.
Window(Window owner)
Constructs a new invisible window with the specified Window as its owner.
Window(Window owner, GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a
GraphicsConfiguration of a screen device.
Java Swing Tutorial Explaining the JWindow Component. JWindow is
Swing’s version of Window and is descended directly from that class. Like
Window, it uses BorderLayout by default. Almost all Swing components are
lightweight except JApplet, JFrame, JDialog, and JWindow.
JWindow Source Code
public class JWindowDemo extends JWindow { private int X = 0; private int Y = 0; public JWindowDemo() { setBounds(60, 60, 100, 100); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); // An Exit Listener } }); // Print (X,Y) coordinates on Mouse Click addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { X = e.getX(); Y = e.getY(); System.out.println("The (X,Y) coordinate of window is (" + X + "," + Y + ")"); } }); addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(MouseEvent e) { setLocation(getLocation().x + (e.getX() - X), getLocation().y + (e.getY() - Y)); } }); setVisible(true); } public static void main(String[] args) { new JWindowDemo(); } } |
Output
Java JWindow Hierarchy
javax.swingClass JWindow
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
BasicToolBarUI.DragWindow, Dialog, Frame, JWindow
JWindow Constructor
Window(Frame owner)
Constructs a new invisible window with the specified Frame as its owner.
Window(Window owner)
Constructs a new invisible window with the specified Window as its owner.
Window(Window owner, GraphicsConfiguration gc)
Constructs a new invisible window with the specified window as its owner and a
GraphicsConfiguration of a screen device.
Subscribe to:
Posts (Atom)