Sunday, July 3, 2011

WHAT IS THE MEANING OF public static void main(String args[])

Some one explain what is means of static and (String arg[]) use in java.
public static void main (String arg[])
Why this term is used in java program?
this is command line argument ..
when we define any fun by static then we this is call automatically

public-----bcz main() is called by jvm which is totally an external code......
static------bcz main function should be one unique function in memory......
void----main() in java is not supposed to return ant status message to OS like C,C++....so return type is void.....
String args[]-------to accept command line arguements.....

public means our program is available to JVM to execute. Because JVM is also another program.If main method is not declared as public then JVM fails to execute main method


static means without creating object execute that method.To create object main has to execute.Without object it is not possible to execute main method.To avoid this problem static keyword is used that means main method is executed without object.
void means it doesn't return any value
String args[] used for taking command line arguments.
static public void main(String args[])....Valid
public static void main(String x[])....These are also valid in java

static is used to avoid any chance of multiple main threads....just to avoid object creation,static is nowhere used...Even As a programmer,we think of using static only when we want only one copy of dat variable or method in memory....

Monday, May 2, 2011

can i rename a folder with con

no because  the following list are DOS devices cannot be used as folder names:
CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. 

these are internal device objects these cannot be assigned to others if so conflicts occurs 
so to avoid that os prevents 
but we can achive this by using the command in command prompt


mkdir \\.\D:\vijay\con 


and to remove the floder type the commad as 


rmdir \\.\D:\vijay\con 



Saturday, April 30, 2011

How to increase memory power and concentration

When learning how to improve memory power and concentration, ensure that you doing something that you enjoy or you will not continue to do it. Your first step should be to look into techniques that you will find interesting personally. Even this exercise will train you to concentrate and to focus in on a mental task which will improve your memory power. Here are some techniques that you can use right now to improve your memory power.


1. If there's something that you find hard to remember, try to look at it with a completely different perspective:


If you have to memorize something that is mathematically based and you hate mathematics, try to translate some of the formulas into more concrete objects. For instance, use a diagram for remembering the formula for calculating the volume of a cylinder.


2. Using repetition is a great way to increase your level of concentration:


If you repeat certain words or phrases over and over again in your mind, you will lock those phrases into your long-term memory. Make sure that you envision each word in order to solidify the memory of each word.


3. Physical exercise can increase the amount of oxygen going to your brain:


Try to exercise at least 30 minutes three times a week. This will increase the amount of oxygen going to your brain which will enhance your ability to remember.






Article Source: http://EzineArticles.com/2898457