<font color='#FF0000'><div align="left">[Sallam .. Yeah i am kindaa late in answering this question, but you guys know theses are the besiest days in any student'sife....well yeah let's talk again about
static key word ... it means that any static variable is only in one copy...so let's say that there is a variable static int counter =1;
and there are 3 methods in the same calss one called public void add()
which adds one to the counter so now the counter is 2 ... right
and another method called multiply which multiply the counter by 5 so the counter is equal tp 10 now if the counter was not static the
multiply result would be 5 because we will take the intitaial value which is 1 but being static means that each time we modify its intial value is rewritten by the new value
and another thing for a static variable or method ... you can call them without having to istantiate the calss they reside in lets say a calss MyClass has the method static print
and another class called TestMyClass wants to call the print method in the MyClass so you have two ways to call it 1- by instantiating the MyClass like this
MyClass obj = new MyClass();
and then call the method like this
obj.print();
or
2- by Just doing this
MyCalss.print();
so we did not have to istantiate the MyClass class
Ok for the java.io package
it is the Input/Output package having clsses that you can to use to read the user input or to read as much data as you want from a file in your computer or Even creating a file using a java program or to read data coming from another compuiter through the netwirk by using Socket .... Yes it is the hardest task i have seen in Java untill now ... but the coolest stuff at the same time it is really amazing as weel as Network Programming
Sure ... post any problem or send it by e-mail and i will be more than happy to lookat it and try to solve it insha'ALLAH
Good Luck and feel free to ask for any help ..... </div></font>
مواقع النشر (المفضلة)