Monday, 26 October 2015

200 Keyboard Shortcuts (Windows) to Boost Your Productivity

Keyboard shortcuts can  Boost Your Productivity if your daily job relies heavily on using Windows. They just don’t get the work done quickly, but also improves the efficiency. Give them a try and you just might find yourself getting addicted to keyboard shortcuts.

We’ve compiled a list of keyboard shortcuts for Windows 190 + shortcuts grouped into categories for easy access. If we missed some shortcut in this list, kindly let us know through the comments section.
Here are the shortcuts to get to the shortcuts:
Note: Some of the shortcuts given below may not work for versions below Windows 8.

General Shortcuts

Let’s start the list with the most common shortcuts that you’ll often use.
  • F1 [Display Help]
  • F2 [Rename the selected item]
  • F3 [Search for a file or folder]
  • F4 [Display the address bar list in File Explorer]
  • F5 [Refresh the active window]
  • F6 [Cycle through screen elements in a window or on the desktop]
  • F10 [Activate the Menu bar in the active app]
  • ALT + F4 [Close the active item, or exit the active app]
  • ALT + ESC [Cycle through items in the order in which they were opened]
  • ALT + Underlined Letter in menus and dialog box options [Perform the command for that letter]
  • ALT + ENTER [Display properties for the selected item]
  • ALT + SPACEBAR [Open the shortcut menu for the active window]
  • ALT + LEFT ARROW [Back]
  • ALT + RIGHT ARROW [Forward]
  • ALT + PAGE UP [Move up one screen]
  • ALT + PAGE DOWN [Move down one screen]
  • ALT + TAB [Switch between open apps (except desktop apps)]
  • CTRL + F4 [Close the active document (in apps that allow you to have multiple documents open simultaneously)]
  • CTRL + A [Select all items in a document or window]
  • CTRL + C or CTRL + INSERT [Copy the selected item]
  • CTRL + D / DELETE [DELETE the selected item and move it to the Recycle Bin]
  • CTRL + R or F5 [Refresh the active window]
  • CTRL + V or SHIFT + INSERT [Paste the selected item]
  • CTRL + X [Cut the selected item]
  • CTRL + Y [Redo an action]
  • CTRL + Z [Undo an action]
  • CTRL + + or CTRL +  [Zoom in or out of a large NUMBER of items, like apps pinned to the Start screen]
  • CTRL + mouse scroll wheel [Change the size of desktop icons or zoom in or out of a large NUMBER of items, like apps pinned to the Start screen]
  • CTRL + RIGHT ARROW [Move the cursor to the beginning of the next word]
  • CTRL + LEFT ARROW [Move the cursor to the beginning of the previous word]
  • CTRL + DOWN ARROW [Move the cursor to the beginning of the next paragraph]
  • CTRL + UP ARROW [Move the cursor to the beginning of the previous paragraph]
  • CTRL + ALT + TAB [Use the arrow keys to switch between all open apps]
  • CTRL + ARROW + SPACEBAR [Select multiple individual items in a window or on the desktop]
  • CTRL + SHIFT + ARROW [Select a block of text]
  • CTRL + ESC [Open the Start screen]
  • CTRL + SHIFT + ESC [Open Task Manager]
  • CTRL + SHIFT [Switch the keyboard layout when multiple keyboard layouts are available]
  • CTRL + SPACEBAR [Turn the Chinese input method editor (IME) on or off]
  • SHIFT + F10 [Display the shortcut menu for the selected item]
  • SHIFT + ARROW [Select more than one item in a window or on the desktop, or select text within a document]
  • SHIFT + DELETE [Delete the selected item without moving it to the Recycle Bin first]
  • RIGHT ARROW [Open the next menu to the right, or open a submenu]
  • LEFT ARROW [Open the next menu to the left, or close a submenu]
  • ESC [Stop or leave the current task]

Windows key Shortcuts

Let’s check the keyboard shortcuts involving the Windows logo key. Most of them are introduced in Windows 8’s Metro UI, and can be used in Windows 8 and above.
  • Win + F1 [Open Windows Help and support]
  • Win [Display or hide the Start screen]
  • Win + B [Set focus in the notification area]
  • Win + C [Open Charms]
  • Win + D [Display and hide the desktop]
  • Win + E [Open File Explorer]
  • Win + F [Open the Search charm and search for files]
  • Win + H [Open the Share charm]
  • Win + I [Open the Settings charm]
  • Win + K [Open the Devices charm]
  • Win + L [Lock your PC or switch people]
  • Win + M [Minimize all windows]
  • Win + O [Lock device orientation]
  • Win + P [Choose a presentation display mode]
  • Win + Q [Open the Search charm to search everywhere or within the open app (if the app supports app search)]
  • Win + R [Open the Run dialog box]
  • Win + S [Open the Search charm to search Windows and the web]
  • Win + T [Cycle through apps on the taskbar]
  • Win + U [Open Ease of Access Center]
  • Win + V [Cycle through notifications]
  • Win + SHIFT + V [Cycle through notifications in reverse order]
  • Win + W [Open the Search charm and search for settings]
  • Win + X [Open the Quick Link menu]
  • Win + Z [Show the commands available in the app]
  • Win + , [Temporarily peek at the desktop]
  • Win + PAUSE [Display the System Properties dialog box]
  • Win + CTRL + F [Search for PCs (if you’re on a network)]
  • Win + SHIFT + M [Restore minimized windows on the desktop]
  • Win + (NUMBER 1-9) [Open the desktop and start the app pinned to the taskbar in the position indicated by the number. If the app is already running, it switches to that app.]
  • Win + SHIFT + (NUMBER 1-9) [Open the desktop and start a new instance of the app pinned to the taskbar in the position indicated by the number]
  • Win + CTRL + (NUMBER 1-9) [Open the desktop and switch to the last active window of the app pinned to the taskbar in the position indicated by the number]
  • Win + ALT + (NUMBER 1-9) [Open the desktop and open the Jump List for the app pinned to the taskbar in the position indicated by the number]
  • Win + CTRL + SHIFT + (NUMBER 1-9) [Open the desktop and open a new instance of the app located at the given position on the taskbar as an administrator]
  • Win + TAB [Cycle through recently used apps (except desktop apps)]
  • Win + CTRL + TAB [Cycle through recently used apps (except desktop apps)]
  • Win + SHIFT + TAB [Cycle through recently used apps (except desktop apps) in reverse order]
  • Win + CTRL + B [Switch to the app that displayed a message in the notification area]
  • Win + UP ARROW [Maximize the window]
  • Win + DOWN ARROW [Remove current app from screen or minimize the desktop window]
  • Win + LEFT ARROW [Maximize the app or desktop window to the LEFT side of the screen]
  • Win + RIGHT ARROW [Maximize the app or desktop window to the RIGHT side of the screen]
  • Win + HOME [Minimize all but the active desktop window (restores all windows on second stroke)]
  • Win + SHIFT + UP ARROW [Stretch the desktop window to the top and bottom of the screen]
  • Win + SHIFT + DOWN ARROW [Restore/minimize active desktop windows vertically, maintaining width]
  • Win + SHIFT + LEFT ARROW or RIGHT ARROW [Move an app or window in the desktop from one monitor to another]
  • Win + SPACEBAR [Switch input language and keyboard layout]
  • Win + CTRL + SPACEBAR [Change to a previously selected input]
  • Win + ENTER [Open Narrator]
  • Win + SHIFT + . [Cycle through open apps]
  • Win + . [Cycle through open apps]
  • Win + / [Initiate IME reconversion]
  • Win + ALT + ENTER [Open WindowsMedia Center]
  • Win + +/- [Zoom in or out using Magnifier]
  • Win + ESC [Exit Magnifier]

Dialog box Shortcuts

These are the keyboard shortcuts that can be used in dialog boxes.
  • F1 [Display Help]
  • F4 [Display the items in the active list]
  • CTRL + TAB [Move forward through tabs]
  • CTRL + SHIFT + TAB [Move back through tabs]
  • CTRL + (NUMBER 1-9) [Move to nth tab]
  • TAB [Move forward through options]
  • SHIFT + TAB [Move back through options]
  • ALT + Underlined Letter in menus and dialog box options [Perform the command (or select the option) that goes with that letter]
  • SPACEBAR [Select or clear the check box if the active option is a check box]
  • BACKSPACE [Open a folder one level up if a folder is selected in the Save As or Open dialog box]
  • ARROW keys [Select a button if the active option is a group of option buttons]

File explorer Shortcuts

These are the shortcuts that can be used to work with File Explorer’s windows or folders.
  • ALT + D [Select the address bar]
  • CTRL + E [Select the search box]
  • CTRL + F [Select the search box]
  • CTRL + N [Open a new window]
  • CTRL + W [Close the current window]
  • CTRL + mouse scroll wheel [Change the size and appearance of file and folder icons]
  • CTRL + SHIFT + E [Display all folders above the selected folder]
  • CTRL + SHIFT + N [Create a new folder]
  • NUM LOCK + * [Display all subfolders under the selected folder]
  • NUM LOCK + + [Display the contents of the selected folder]
  • NUM LOCK +  [Collapse the selected folder]
  • ALT + P [Display the preview pane]
  • ALT + ENTER [Open the Properties dialog box for the selected item]
  • ALT + RIGHT ARROW [View the next folder]
  • ALT + UP ARROW [View the folder that the folder was in]
  • ALT + LEFT ARROW [View the previous folder]
  • BACKSPACE [View the previous folder]
  • RIGHT ARROW [Display the current selection (if it’s collapsed), or select the first subfolder]
  • LEFT ARROW [Collapse the current selection (if it’s expanded), or select the folder that the folder was in]
  • END [Display the bottom of the active window]
  • HOME [Display the top of the active window]
  • F11 [Maximize or minimize the active window]

Taskbar Shortcuts

Here are the keyboard shortcuts to work with items on the Desktop’s taskbar.
  • SHIFT + Click a Taskbar Button [Open an app or quickly open another instance of an app]
  • CTRL + SHIFT + Click a Taskbar Button [Open an app as an administrator]
  • SHIFT + Right-click a Taskbar Button [Show the window menu for the app]
  • SHIFT + Right-click a Grouped Taskbar Button [Show the window menu for the groUP]
  • CTRL + Click a Grouped Taskbar Button [Cycle through the windows of the groUP]

Ease of access Shortcuts

These are the keyboard shortcuts to help you use your computer easily.

  • Hold RIGHT SHIFT for eight seconds [Turn Filter Keys on and off]
  • LEFT ALT + LEFT SHIFT + PRINT SCREEN [Turn High Contrast on or off]
  • LEFT ALT + LEFT SHIFT + NUM LOCK [Turn Mouse Keys on or off]
  • Press SHIFT five times [Turn Sticky Keys on or off]
  • Press NUM LOCK for five seconds [Turn Toggle Keys on or off]
  • Win + U [Open the Ease of Access Center]

Magnifier Shortcuts

Here are the keyboard shortcuts to help you use Magnifier.
  • Win + + [Zoom in]
  • Win +  [Zoom out]
  • CTRL + ALT + SPACEBAR [Preview the desktop in full-screen mode]
  • CTRL + ALT + D [Switch to docked mode]
  • CTRL + ALT + F [Switch to full-screen mode]
  • CTRL + ALT + I [Invert colors]
  • CTRL + ALT + L [Switch to lens mode]
  • CTRL + ALT + R [Resize the lens]
  • CTRL + ALT + ARROW keys [Pan in the direction of the ARROW keys]
  • Win + ESC [Exit Magnifier]

Narrator Shortcuts

These are the keyboard shortcuts to help you use Narrator.
  • SPACEBAR or ENTER [Activate current item]
  • TAB + ARROW Keys [Move around on the screen]
  • CTRL [Stop reading]
  • CAPS LOCK + D [Read item]
  • CAPS LOCK + M [Start reading]
  • CAPS LOCK + H [Read document]
  • CAPS LOCK + V [Repeat phrase]
  • CAPS LOCK + W [Read window]
  • CAPS LOCK + PAGE UP or PAGE DOWN [Increase or decrease the volume of the voice]
  • CAPS LOCK + +/- [Increase or decrease the speed of the voice]
  • CAPS LOCK + SPACEBAR [Do default action]
  • CAPS LOCK + LEFT or RIGHT ARROW [Move to previous/next item]
  • CAPS LOCK + F2 [Show commands for current item]
  • Caps + ESC [Exit Narrator]

Remote desktop connection Shortcuts

These are the keyboard shortcuts to ease the use of remote desktop connection.
  • ALT + PAGE UP [Move between apps, left to right]
  • ALT + PAGE DOWN [Move between apps, right to left]
  • ALT + INSERT [Cycle through apps in the order that they were started]
  • ALT + HOME [Display the Start screen]
  • CTRL + ALT + BREAK [Switch between a window and full screen]
  • CTRL + ALT + END [Display the Windows Security dialog box]
  • CTRL + ALT + HOME [In full-screen mode, activate the connection bar]
  • ALT + DELETE [Display the system menu]
  • CTRL + ALT + 
    [Place a copy of the active window, within the client, on the Terminal server clipboard (similar to ALT + PRINT SCREEN on a local PC)]
  • CTRL + ALT + +
    [Place a copy of the entire client window area on the Terminal server clipboard (similar to Print Screen on a local PC)]
  • CTRL + ALT + RIGHT ARROW
    [TAB out of the Remote Desktop controls to a control in the host app (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) app.]
  • CTRL + ALT + LEFT ARROW
    [TABout of the Remote Desktop controls to a control in the host app (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) app.]

Help viewer Shortcuts

These are the keyboard shortcuts that can be used with the help viewer.
  • F3 [Move the cursor to the search box]
  • F10 [Display the Options menu]
  • HOME [Move to the beginning of a topic]
  • END [Move to the end of a topic]
  • ALT + LEFT ARROW [Move back to the previously viewed topic]
  • ALT + RIGHT ARROW [Move to the next (previously viewed) topic]
  • ALT + HOME [Display the Help and support home page]
  • ALT + A [Display the customer support page]
  • ALT + C [Display the TABle of Contents]
  • ALT + N [Display the Connection Settings menu]
  • CTRL + F [Search the current topic]
  • CTRL + P [Print a topic]

App rearranging Shortcuts (Metro)

Here are the keyboard shortcuts that can be used to rearrange apps on Metro screen. You should keep the Windows key pressed down continuously once you enter in the rearrange mode, then use the various commands. When you’re done rearranging apps, then release the Windows key.
  • Win + . [Enter Rearrange mode and select apps or dividers across monitors]
  • Win + LEFT ARROW [Move app divider left]
  • Win + RIGHT ARROW [Move app divider right]
  • Win + UP ARROW [Maximize app]
  • Win + DOWN ARROW [Close app]
  • Win + ESC [Exit Rearrange mode]

Saturday, 24 October 2015

C++ Interview Questions and Answers For Freshers

C++ Interview Questions and Answers For Freshers


1. Explain about abstraction

* Simplified view of an object in user’s language is called abstraction.

*It is the simplest, well-defined interface to an object in OO and C++ that provides all the expected          features and services to the user in a safe and predictable manner.

*It provides all the information that the user requires.

*Good domain knowledge is important for effective abstraction.

*It separates specifications from implementation & keeps the code simpler and more stable.


2. a.) What is the real use of a class – to export data?

No, the real purpose of a class is not to export data. Rather, it is to provide services. Class provides a way to abstract behaviour rather than just encapsulating the bits.


b.) What are the things need to remember while making a interface?



* A class’s interface should be sensible enough. It should behave the way user expects it to.
* It should be designed from the outside in.

4. Explain the use inheritance.

The use of  inheritance are :
         a.) substitutability
          b.) extensibility.
Substitutability: The objects of a properly derived class can be easily and safely substituted for an                                  object of its base class.
Extensibility: The properly derived class can be freely and safely used in place of its base class even if the properly derived class is created a lot later than defining the user code. Extending the functionalities of a system is much easier when you add a properly derived class containing enhanced functionalities.

4. Does improper inheritance have a potential to week a project?

Many projects meet a dead end because of bad inheritance. So, it certainly has the potential to week a project.
Small projects still have a scope to avoid the complete consequence of bad inheritance if the developers communicate and co-ordinate with an easy system design. This kind of a luxury is not possible in big projects, which means that the code breaks in a way difficult and at times impossible way to fix it.

5. How should RT(run time) errors be handled in C++?

* The runtime errors in C++ can be handled using exceptions.
* This exception handling mechanism in C++ is developed to handle the errors in software made up       of independently developed components operating in one process and under synchronous control.
* According to C++, any routine that does not fulfil its promise throws an exception. The caller who      knows the way to handle these exceptions can catch it.

6. When should a function throw an exception?

*A function should throw an exception when it is not able to fulfil its promise.As soon as the function    detects a problem that prevents it from fulfilling its promise, it should throw an exception. If the         function is able to handle the problem, recover itself and deliver the promise, the exception should     not be thrown.
* If an event happens very frequently then exception handling is not the best way to deal with it. It requires proper fixation.

7. Where setjmp and longjmp functions are used in C++?

* Setjmp and longjmp should not be used in C++.
* Longjmp jumps out of the function without unwinding the stack. This means that the local objects     generated are not destructed properly.
* The better option is to use try/catch/throw instead. They properly destruct the local objects.

8. Are there ant special rules about inlining?

* Yes, there are a few rules about inlining
1. Any source files that used the inline function must contain the function’s definition.
2. An inline function must be defined everywhere. The easier way to deal with this to define the function once in the classheader file and include the definition as required. The harder way is to redefine the function everywhere and learn the one-definition rule.
3.main() can not be inline.

9. Explain ORD(one-definition rule).

According to one-definition rule, C++ constructs must be identically defined in every compilation unit they are used in.
As per ODR, two definitions contained in different source files are called to be identically defined if they token-for-token identical. The tokens should have same meaning in both source files.
Identically defined doesn’t mean character-by-character equivalence. Two definitions can have different whitespace or comments and yet be identical.

10. What are the advantages of using friend classes?

Friend classes are useful when a class wants to hide features from users which are needed only by another, tightly coupled class.Implementation details can be kept safe by providing friend status to a tightly cohesive class.

C++ Interview Questions and Answers For Freshers

11. What is the use of default constructor?

It is a constructor that does not accept any parameters.
If there is no user-defined constructor for a class, the compiler declares a default parameterless constructor called default constructor. It is an inline public member of its class.
When the compiler uses this constructor to create an object – the constructor will have no constructor initializer and a null body.

12. Differentiate between class and structure.

* The members of structures are public while those of a class are private.
* Classes provide data hiding while structures don’t.
* Class bind both data as well as member functions while structures contain only data.

13. Explain container class.

* Class to hold objects in memory or external storage. It acts as a generic holder.
* It has a predefined behaviour and a known interface.
* It is used to hide the topology used for maintaining the list of objects in memory.

The container class can be of two types:

Heterogeneous container: Here the container class contains a group of mixed objects
Homogeneous container: Here the container contains all the same objects.

14. a.) Explain about name space?

* namespaces are used to group entities like classes, objects and functions under a name.

b.) Explain explicit container.

* These are constructors that cannot take part in an implicit conversion.
* These are conversion constructors declared with explicit keyword.
* Explicit container is reserved explicitly for construction. It is not used by the compiler to implement an implied conversion of types.

15. Explain class invariant in C++.
* It is a condition that ensures correct working of a class and defines all the valid states for an object.
* When an object is created class invariants must hold.
* It is necessary for them to be preserved under all operations of the class.
* All class invariants are both preconditions as well as post-conditions for all operations or member     functions of the class.

16. Differentiate between late binding and early binding. What are the advantages of early binding?

* a.) Late binding refers to function calls that are not resolved until run time while early binding           refers to the events that occur at compile time.
* b.) Late binding occurs through virtual functions while early binding takes place when all the information needed to call a function is known at the time of compiling.
* Early binding increases the efficiency. Some of the examples of early binding are normal function calls, overloaded function calls, and overloaded operators etc.

17. Explain public, protected, private in C++?

These are three access specifiers in C++.

       Public: Here the data members and functions are accessible outside the class.
        Protected: Data members and functions are available to derived classes only.
          Private: Data members and functions are not accessible outside the class.

Data Structures Interview Questions-Placement paper

Data Structures Interview Questions Placement paper


1. To represent hierarchical relationship between elements, which data structure is suitable?

a). Deque                b).Priority                 c).Tree                 d).All of above

2. A binary tree whose every node has either zero or two children is called

a).Complete binary tree           B).Binary search tree     C).Extended binary tree   D).None of above

3. The depth of a complete binary tree is given by

a).Dn = n log2n               b).Dn = n log2n+1          c).Dn = log2n              D).Dn = log2n+1

4. Which of the following data structure store the homogeneous data elements?

a).Arrays                    b).Records            c).Pointers                 D).None

5. A binary tree can easily be converted into q 2-tree

a).by replacing each empty sub tree by a new internal node
b).by inserting an internal nodes for non-empty node
c).by inserting an external nodes for non-empty node
d).by replacing each empty sub tree by a new external node

6. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called

a).underflow            b).overflow        c).housefull                d).saturated

7. The complexity of Bubble sort algorithm is

a).O(n)              b).O(log n)              c).O(n2)             d).O(n log n)

8. The data structure required to evaluate a postfix expression is

a).queue                 b).stack            c).array                d).linked-list

9. The indirect change of the values of a variable in one module by another module is called

a).internal change            b).inter-module change      c).side effect      d).side-module update

10. The process of accessing data stored in a serial access memory is similar to manipulating data on a
a).heap               b).queue                c).stack            d).binary tree

11. Which of the following data structure is linear data structure?

a).Trees                 b).Graphs           c).Arrays               d).None of above

12. The operation of processing each element in the list is known as

a).Sorting               b).Merging                c).Inserting               d).Traversal

13. Finding the location of the element with a given value is:

a)Traversal                 b).Search                c). Sort                    d).None of above

14. A BST is traversed in the following order recursively: Right, root, left The output sequence will be in
a).Ascending order               b).Descending order    c).Bitomic sequence    d).No specific order

15. Linked lists are best suited

a).for relatively permanent collections of data
b).for the size of the structure and the data in the structure are constantly changing
c).for both of above situation
d).for none of above situation

16. Each array declaration need not give, implicitly or explicitly, the information about

a).the name of array
b).the data type of array
c).the first data from the set to be stored
d).the index set of the array

Data Structures Interview Questions-Placement paper

17. A binary tree of depth “d” is an almost complete binary tree if

a).Each leaf in the tree is either at level “d” or at level “d–1”
b).For any node “n” in the tree with a right descendent at level “d” all the left descendents of “n” that are leaves, are 
also at level “d”
c).Both (a) and (b)
d).None of the above

18. Which of the following is not a limitation of binary search algorithm?

a).must use a sorted array
b).requirement of sorted array is expensive when a lot of insertion and deletions are needed
c).there must be a mechanism to access middle element directly
d).binary search algorithm is not efficient when the data elements are more than 1000.

19. Identify the data structure which allows deletions at both ends of the list but insertion at only one end.

a).Input-restricted deque                                                        b).Output-restricted deque
c).Priority queues                                                                                 d).None of above

20. Which of the following data structure is non-linear type?

a).Strings               b).Lists              c).Stacks             d).None of above

21. Which of the following data structure is linear type?

a).Strings                        b).Lists                       c).Queues                     d).All of above

22. char txt [20] = “Hello world!\0”;   How many bytes are allocated by the definition above?

a).11 bytes                b).12 bytes       c).13 bytes         d).20 bytes           e).21 bytes

23. The Average case occur in linear search algorithm

a).When Item is somewhere in the middle of the array
b).When Item is not in the array at all
c).When Item is the last element in the array
d).When Item is the last element in the array or is not there at all

24. The complexity of the average case of an algorithm is

a).Much more complicated to analyze than that of worst case
b).Much more simpler to analyze than that of worst case
c).Sometimes more complicated and some other times simpler than that of worst case
d).None or above

25. In a linked list with n nodes, the time taken to insert an element after an element pointed by some pointer is
a).0 (1)
b).0 (log n)
c).0 (n)
d).0 (n 1og n)

26. The complexity of Binary search algorithm is

a).O(n)
b).O(log )
c).O(n2)
d).O(n log n)

Friday, 23 October 2015

Core Java with OCJP_SCJP Language Fundamentals Part-6 __ Arrays Part-1


Core Java with OCJP_SCJP Language Fundamentals Part-6 __ Arrays Part-1

Arrays

Introduction-
                          An array is a data structure that represents an index collection of fixed no of homogeneous data  elements. The main advantage of arrays is we can represent a group of values with single name  hence readability of the code will be improved. The main limitation of arrays is they are fixed in size. i.e once we constructed an array there is no chance of increasing or decreasing bases on our requirement hence with respect to memory arrays shows worst performance we can overcome this problem by using collections.

Array Declaration-

The following are the ways to declare an array.
      1)  int [] a;
      2)  int a[];
      3)  int [] a;

The first one is recommended to use because the type is clearly separated from the name.
At the first time of declarations we are not allowed to specify the size. Violation leads to C.E.
 Ex:.

Declaring Multidimensional Arrays

 The following are the valid declarations for multidimensional arrays.  
                               int[][] a;
                               int a[][];
                               int [][]a;
                               int[] a[];
                               int[] []a; 
we can specify the dimension before name of variable also, but this facility is available only for the first variable.

Which of the following declarations are valid? 


Construction of Arrays

Single Dimension: Arrays are internally implemented as object hence by using new operator we can construct an array.

Compulsory at the time of construction we should specify the size otherwise compile time error.
 Ex:-
                    we will get R.E saying NegativeArraySizeException.

The only allowed Data type to allow the size are byte, short, char, int. if we are using any other datatype we will get a C.E.


The maximum allowed Array Size in java is 2147483648.