مشاهدة النسخة كاملة : Learn how to program in java
بن دبي
06-05-03 ||, 01:24 PM
<font color='#000000'>Sallam to all ....i hope you are all doing great ... and please excuse me for not writing in Arabic becaude i do not have a keyboard with Arabic Letters lables , well i can some time type a paragraph in Arabic if it is so necessary but that takes me so much time. Any how our subject today is Java programming
*Many of you have heared about Java and JavaScript
*They are totally different Java is a programming language that gets compiled into bytecode and evaluated in the Microprocessor of the PC
*On the other hand , JavaScript is does not have to be compiled into machine language , but rather it is alanguage that is used to add some dynamic actions to the plain text or graphics in a web site.
* Java was developed by Sun Microsystem Company www.sun.com in 1991 and it wa called OAk at the beginning and then was officially called Java in 1995? Why? it is named so after an island in indonesia called Java
*Java is a platform independent , which means that the java programs can work on any computer so we say:"Compile once and run wherever
*So much for that now , let us get to the taste of it
*why some times we can not open some chat programs in some web sites?<img src="http://oasis.bindubai.com/emoticons/rock.gif" border="0" valign="absmiddle" alt='???'>? think wi th me....mmmmmm..well those programs are basically Java Applets and out IE == Internet Explorer does not support some Applets because Microsoft got in conflict with Sun and it has no licence for Java releases from 1.1.8 and onward
*so how would we get it running in our machines well you need to install one of the releases and i recommond 1.4 so go to www.java.sun.com and then downloads and chose 1.4 and go through the process of downloading
* aha and now we have it on our machines but that is not all you have to set the path....the instructions are there also but for XP whih i am using ...you would go t o control panel> system< advanced and the to environment variables< and then double click path and then at the end put ;C:\....the path\jdk..the version you have installed\bin
* for the jdk.... you can just copy the name of the folder created by the installer
.........that is it for now i will give you time to install it and i will be avaliable to answer any question and a fter you are done with setting up the software we will start programming insha'ALLAH
Note: Copyright ---- any one can copy and use what i wrote above and if some one can translate it in Arabic to help other members that will be great...so take your time</font>
بن دبي
06-05-03 ||, 03:55 PM
<font color='#000000'>No Body is interested ....yeah the layout is kind of awful and the laguage is kindaa difficult and there are some mistyoped words ....but at any case i will give you more time....waiting to hear from you brothers and sisters
SalLam</font>
فتاه من الشرق
06-05-03 ||, 04:52 PM
<font color='#E77471'><div align="left"> السلام عليكم اخوويه...
i wish to learn java script, well i'm going to learn it very soon, as i'm studying programming and this is my second year..
but the problem is that i cannot download any more programs, coz i have a problem with my pc.. its very slaw and doesnt have space to download more programs <img src="http://oasis.bindubai.com/emoticons/sad.gif" border="0" valign="absmiddle" alt=':('>
but go a head brother, its really an interesting subject..
inshallah as soon as i change my pc, i'll come back in this topic and download the program and follow up with you>>> <img src="http://oasis.bindubai.com/emoticons/down.gif" border="0" valign="absmiddle" alt=':dd:'>
</div>
<div align="left">thanx alot brother,,
good luck</div></font>
بن دبي
07-05-03 ||, 03:50 AM
<font color='#000000'>public class MyFirstClass
{
public static void main( String [] args)
{
system.out.println(“Hello World”);
}
}
Now go to your MS-DOS command prompt from start> run > and then type in command or cmd and you will see something like this this:
public class MyFirstClass
{
public static void main( String [] args)
{
system.out.println(“Hello World”);
}
}
Now go to your MS-DOS command prompt from start> run > and then type in command or cmd and you will see something like this this:
where I erased my name. There are two backslashes which means we are two folders inside the C: directory so we basically type “cd ../../” that is 2 slashes with 2 dots after each one and that command will take us two levels up and now we are in the C directory. Suppose we named the directory in which we save our java files as “JavaClasses” so we will type : “cd JavaClasses” and note it is case-sensetive. The we will type
javac MyFirstClass.java à this is to compile the code and this will generate a the
MyFirstClass.class file which we will use for running the program so go and check the
JavaClass Directory to find the above named “.class” file
To Run the program type in :
java MyFirstClass -à this time we did not add the suffix “.class” because java
compiler will look at the “file_name.class” so we just need to provide the “.class” file
name without adding the suffix to it and there is another difference ; the first command
javac MyFirstClass.java has the letter c attached to it which tell s that is compiling
a compilation process. AS a result every one should get this output below :
I hope you enjoy it and if you have any question just ask?! Sallam now
if the images do not show up plz double-click themand go tp properties and then copy their location and paste it into a new IE window</font>
بن دبي
07-05-03 ||, 03:52 AM
<font color='#000000'>Sorry guys
those pictures never showed up coz the admin says that i am not allowed to upload those kind of pictures i do not know why is that??? any body can contact the admin and tell him that those ppictures are from the MS-Dos command</font>
رويان
07-05-03 ||, 07:20 AM
<font color='#000000'><div align="center">السلام عليكم والرحمه ...
اولا sankUoo على هالموضوع <img src="http://oasis.bindubai.com/emoticons/woman1.gif" border="0" valign="absmiddle" alt=':wom:'>
ثانيا .. بالنسبة للمشكلة :
انت لما تسوي up load للصوره..
بعد الـ jpg او الـ gif موجود عندك دوت ..
المفروض تشيلها حتى يكون موقع الصوره صح ..
<img src="http://oasis.bindubai.com/download/c1.jpg" onload = "javascript:if(this.width > (screen.width/2)){this.width = (this.width/2)}" onclick="javascript:if(this.width > (screen.width/2)){this.width = (this.width/2)} else {this.width = (this.width*2)}" border="0" alt='Posted image: Click to resize'>
<span style='color:red'>ثالثا والاهم ..
يا ليت تشرح الـ classes وتحط تطبيقات عليها .. <img src="http://oasis.bindubai.com/emoticons/man4.gif" border="0" valign="absmiddle" alt=':man:'> </span>
ويسلمو على هالموضوع ..
<img src="http://oasis.bindubai.com/emoticons/love.gif" border="0" valign="absmiddle" alt=':lo:'>
...</div></font>
بن دبي
07-05-03 ||, 09:33 AM
<font color='#000000'>Thanx for the help and the reminder Sara
Well i was gonna go over these things just after getting
the signal of acceptance of this subject...and here it
lights up by your and Fatat al Sharq's Comments
What does the every typical code consist of
1/Class : Unlike other programming languages , Java
Require the user to put the code withen a class named
by him/herself.....so what is a class ...it is basically a
name and it is the basic element of any java program
and every other thing is to be included inside it
the one i provided above is named MyFirstClass...and
here is one more thing .... the name of the class must
match the name of the file that contains your code
so if you named the file as BinDubai.java you will have
to start your code with public class BinDubai
and that is the first line of code in every program you
write....the comes the { or the curly bracket
which will have to be closed with another } at the very end
of your code which means that every other thing inside
those brackets belongs to the BinDubai class ...that is
all for class for now
then comes another very important thing
the main method or....public static void main(String [ ] args)
that is the place where the program will start excution
or will basically will give you some thing and then {
this means this is the start of the main method and
as well as for the class it has to be closed with another}
for the time being we want to just print a message saying
Sallam To All Members in BinDubai
so what we will do that we will type
System.out.println("Sallam To All Members in BinDubai");
and notice that every statement has to end with a ;
and every statement is case-sensetive so follow what
is written exactly but not for the closing (( because this
writing panel is Arabic oriented so it does not show it
correctly as it is suppose to be in English()
so now from the experience in the first lesson and this
one , you dhould be able to write a prgram that prints
a welcome message in MS-DOS command window
so try this one
public class BinDubai
}
public static void main(String [ ] args) ;
}
System.out.println("Hello Bindubai members");
{
{
Note : if you are really interested in learning the language
i will work with you step-by-step insha'ALLAH so do not
hesitate to ask any question at any time .....my e-mail is
qmaqma@hotmail.com...i check it almost every two
hours while i am awake ...so send any question or
problem and expect the answer to be in English
because i do not have ArabicKeyboard now , but i can
read and understand Arabic much better than English
So excuse me once again
Finally, if somebody feels this is useless or meaningless
please let me know and i will stop it imeadiately and we
can switch to learn another language like SQL or HTML
Sallam To All now.....................:)</font>
رويان
07-05-03 ||, 12:41 PM
<font color='#000000'>..
صقر تسلم على الشرح ..
طيب انت سو سكب لكل شي وخلك على الكلاسز <img src="http://oasis.bindubai.com/emoticons/lookaround.gif" border="0" valign="absmiddle" alt=':look:'>
سؤال كيف استخدم الـ set and get methods في الكلاس نفسه ...وهل من الضروري اصلا اني استخدمها ؟
وبعدين لما نسوي import للكلاسات شو الفرق بين الـ core pagage والـ extension pakkage
<img src="http://oasis.bindubai.com/emoticons/blush.gif" border="0" valign="absmiddle" alt=':b:'>
والبقية آتية <img src="http://oasis.bindubai.com/emoticons/devil.gif" border="0" valign="absmiddle" alt=':de:'>
<img src="http://oasis.bindubai.com/emoticons/pirate.gif" border="0" valign="absmiddle" alt=':por:'></font>
بن دبي
07-05-03 ||, 01:10 PM
<font color='#000000'>Ok sure Sara
every program can work with out a set, also called mutator, or a get , also called accessor, methods
but we need them if we want to make our attributes or global variables as private so we want to provide a way to other classes using this calss to acces the variables and change them or get their value so we use accessor and mutator which are easy methods
* Get method:
public variabletype get<span style='color:red'>VariableName</span>()
}
return <span style='color:orangered'>variablename</span>;
}
for the Mutator or the set
public void setVariableName(variabletype anewvariablename)
}
variableName = anewvariablename;
{
i never heared of those type of packages but i would think that a core package is when you type like
import java.util.*;
this way you imported every class in the java.util package and you just use whatever class you want .... and that is what i always do because it saves me time and effort to write an import statement for each class i use
and for the extension package i think it would be like import java.util.StringTokenizer;
which only imports the StringTokenizer class
so that is how i understand it but in case i did understand it wrong just let me now and give me examples so i can inshaALLAH explain more
Good Questions Though
GOOD LUCK</font>
بن دبي
07-05-03 ||, 02:48 PM
<font color='#000000'>Oh sorry i guess i got it now
Let us say java.util
That is two packages the core one is java and the util is
the extension package because util resides inside the java package...it is basically a matter of path
package so that is why is called like that
Good Luck</font>
رويان
07-05-03 ||, 04:23 PM
<font color='#000000'><div align="center">السلام والرحمه ..
هذي امثلة على الـ core والـ extension
pakages
<img src="http://oasis.bindubai.com/download/j0.jpg" onload = "javascript:if(this.width > (screen.width/2)){this.width = (this.width/2)}" onclick="javascript:if(this.width > (screen.width/2)){this.width = (this.width/2)} else {this.width = (this.width*2)}" border="0" alt='Posted image: Click to resize'>
وبالنسبة للجزء النظري .. ماشي معاي بس المشكلة لما تجيني مسألة اخبصها من الخاطر ..
فلو تحط مسألة و حلها كمثال لاجل اناقشك فيه اكون شاكره لك .. <img src="http://oasis.bindubai.com/emoticons/blush.gif" border="0" valign="absmiddle" alt=':b:'>
السموحه .. <img src="http://oasis.bindubai.com/emoticons/blush.gif" border="0" valign="absmiddle" alt=':b:'>
</div></font>
بن دبي
08-05-03 ||, 08:40 AM
<font color='#000000'>Well as i told i never had aquestion in an exam or by any
body else about this , so i can not give you examples:dd:
but if you can bring the question , i promise that i will try
my best to solve it
At the end, after seeing your example i came with this eplanation
Core Packages: are packages provided by sun MicrosSystem and that are necessary for Java language to function like the one you had above
Extension Packages: they are packages developed by another user or company for a special purpose like the robocode package developed by IBM and you youself can actually creat your own package and do import using the sataement package packagename; which goes in the first line of any class to be included in that particular package ..... Also Extension packages incluede packages developed by Sun Microsystems itself like the one you provided javax.swing.*;
because the classes in this package do the same work as the the java.awt.*;
classes actually do and so we can call
javax.swing as an <span style='color:red'>extention</span>of the java.awt package
and so on you can find other packages developed by Sun which realy do the same thing as other older packages do but with some improvements and i do not think there is a way in which you can tell if this package is a core one or an extension one from just looking at its name:D ....so you gotta study and see more examples
Finally i am really impressed by these question .. they are
really excellent question
Thanx alot</font>
أسير الذكريات
08-05-03 ||, 02:18 PM
<font color='#810541'>Salaam brother Saqer. Actually I am studying java this semester. I am having a difficult time understanding it. It seems very challenging to me. Probably my teachers are not so good in explaining it. Whenever I have an assignment, I spend so much time in front of the computer trying to figure out how to do it. For example, this Friday we have a program due. We have to use around 9 classes to do this program. I have started it but I got to a point where I can not move further. If you want, I can send you a copy of my work to look at it. It really confuses me especially when I get these weired exceptions. I hope I can understand it one day, and if you are interested in looking at my assignment, send me your email and I will send it to you
Take care buddy
أسير الذكريات</font>
رويان
08-05-03 ||, 07:06 PM
<font color='#000000'>السلام والرحمه ..
<img src="http://oasis.bindubai.com/emoticons/crazy.gif" border="0" valign="absmiddle" alt=':cra:'>
خلونا نتكلم عن الـ user defined class
وهذا اللي كنت اقصده بالمثال ..
ان يكون المطلوب انك تسوي كلاس يحتوي على كذا methods ..
..</font>
بن دبي
09-05-03 ||, 02:11 AM
<font color='#000000'>I apologize for being late in responding . It is the
difference in time since i go to school outside the country
Anyway Brother Aseer send me the problem statement and the code you have developed and i will do my best to solve it
my e-mail is : QMAQMA@hotmail.com
Sara....i will come to your question later insha'ALLAH</font>
بن دبي
09-05-03 ||, 11:17 AM
<font color='#000000'>import java.io.*;
public class Calculator
{
public static void main (String []args)
{
try
{ System.out.println("Enter first number:");
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in), 1);
String input1 = bufferedreader.readLine();
int num1 = Integer.parseInt(input1);
System.out.println("Enter second number:");
BufferedReader bufferedreader2 = new BufferedReader(new InputStreamReader(System.in), 1);
String input2 = bufferedreader2.readLine();
int num2 = Integer.parseInt(input2);
System.out.println(num1 + " + " + num2 + " is : " + add(num1,num2));
System.out.println(num1 + " - " + num2 + " is : " + subtract(num1,num2));
System.out.println(num1 + " * " + num2 + " is : " + multiply(num1,num2));
System.out.println(num1 + " / " + num2 + " is : " + divide(num1,num2));
}
catch(IOException io)
{
System.out.println(io.getMessage());
}
}
public static int add(int inte1 , int inte2)
{
return inte1 + inte2;
}
public static int subtract(int inte1 , int inte2)
{
return inte1 - inte2;
}
public static int multiply(int inte1 , int inte2)
{
return inte1 * inte2;
}
public static int divide(int inte1 , int inte2)
{
return inte1 / inte2;
}
}
That is a simple class which do some calculations if you have questions just list them and i will answer them insha'ALLAH
I know there will be good question so .... go a head</font>
بن دبي
09-05-03 ||, 11:32 AM
<font color='#000000'><div align="left">
import java.io.*;
public class Calculator
{
public static void main (String []args)
{
try
{ System.out.println("Enter first number:");
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in), 1);
String input1 = bufferedreader.readLine();
int num1 = Integer.parseInt(input1);
System.out.println("Enter second number:");
BufferedReader bufferedreader2 = new BufferedReader(new InputStreamReader(System.in), 1);
String input2 = bufferedreader2.readLine();
int num2 = Integer.parseInt(input2);
System.out.println(num1 + " + " + num2 + " is : " + add(num1,num2));
System.out.println(num1 + " - " + num2 + " is : " + subtract(num1,num2));
System.out.println(num1 + " * " + num2 + " is : " + multiply(num1,num2));
System.out.println(num1 + " / " + num2 + " is : " + divide(num1,num2));
}
catch(IOException io)
{
System.out.println(io.getMessage());
}
}
public static int add(int inte1 , int inte2)
{
return inte1 + inte2;
}
public static int subtract(int inte1 , int inte2)
{
return inte1 - inte2;
}
public static int multiply(int inte1 , int inte2)
{
return inte1 * inte2;
}
public static int divide(int inte1 , int inte2)
{
return inte1 / inte2;
}
}
That is a simple class which do some calculations if you have questions just list them and i will answer them insha'ALLAH
I know there will be good question so .... go a head </div></font>
رويان
09-05-03 ||, 09:13 PM
<font color='#000000'>اممممممم
كيف اعرف الـ class من الـ application ؟؟؟
في الـ new operetor ضروري اني اسوي invoke للـ constructor ؟؟؟
واشمعنى أن الـ method يكون static .. مثل معنى تواجدها في الـ function في الـ ++C ؟؟
والسموحه ..</font>
الكرزالمنسي
10-05-03 ||, 05:13 AM
<font color='#E77471'><img src="http://oasis.bindubai.com/emoticons/wow.gif" border="0" valign="absmiddle" alt=':O'> <img src="http://oasis.bindubai.com/emoticons/wow.gif" border="0" valign="absmiddle" alt=':O'> <img src="http://oasis.bindubai.com/emoticons/wow.gif" border="0" valign="absmiddle" alt=':O'> <img src="http://oasis.bindubai.com/emoticons/wow.gif" border="0" valign="absmiddle" alt=':O'> <img src="http://oasis.bindubai.com/emoticons/wow.gif" border="0" valign="absmiddle" alt=':O'>
salaam all,
after all iam the one who is really confused with all these stuff,
i was really intersted to learn java script and i dont know why now i lose that interest
<img src="http://oasis.bindubai.com/emoticons/down.gif" border="0" valign="absmiddle" alt=':dd:'>
it is sound hard to me, you know what ? before learning visual basic i was really exicting <img src="http://oasis.bindubai.com/emoticons/tounge.gif" border="0" valign="absmiddle" alt=':p'> but now i dont because of our GREAT teacher <img src="http://oasis.bindubai.com/emoticons/mad.gif" border="0" valign="absmiddle" alt=':angry:'>
whatever, NOW i want to learn java and i want to know what kind of proggrame should i have and all the requirements and i will be greatful
thanx brothers and sisters <img src="http://oasis.bindubai.com/emoticons/blush.gif" border="0" valign="absmiddle" alt=':b:'></font>
رويان
10-05-03 ||, 05:45 AM
<font color='#000000'>السلام والرحمه ..
الكرز المنسي ..
استخدم الـ JBuilder 8
..</font>
بن دبي
10-05-03 ||, 08:12 AM
<font color='#000000'><div align="left">there is not a big difference , the class could be one of
the application's many classes or it could be itself the
application if the application has only one class and there
is a diiference between a stand-alone application and
a GUI application ... the first oneis a text or command-line
the second is a graphical user interface
For using the new operator you do not have to use it
if the constructor does not do anything that affect the
performance of the methods in the class you want to
call from so if the and if all the class methods are static
whic means you can call them by only putting the name of the class
and the name of the desired method and a dot in between like this :
MyClass.printName();
or a predefined method Math.random();
and so on static basic meaning is that there is only one
refrence of the method or of the variable is used by every object of that class
lets say we have a 3 classes 2 of them instantiate that
one class and each one get a value of a static variable and set it to a value so the first object getting the value of that variable will get the original value which the developer of that class usually set to 0 ... ,,, suppose that object set this varible to 5 for example ...then the second oject call that same variable what value would it get for it?<img src="http://oasis.bindubai.com/emoticons/rock.gif" border="0" valign="absmiddle" alt='???'>?? it will get 5 because it is only one copy used by all the objects and the same works for the static methods....hope that solve the problem , but my advice for now is that you think of the static method or variable is that you can call them without instantiating their calsses using the way mentioned above and then when <img src="http://oasis.bindubai.com/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'> you go further in programming you will know the cool difference.....any how always nice questions ...keep the good work up
Regards....</div></font>
بن دبي
10-05-03 ||, 08:52 AM
<font color='#000000'><span style='color:darkblue'><div align="left">الكرزالمنسي
Sorry for being late to respond sister, now lets ge this straight...JavaScript is as i mentioned in the first posting a completely different language from the programming language Java which we are talikng about in this context...so which one you want to learn? i would assume that you want to learn Java so read the first and second posting please...but if you want to learn the JavaScript , HTML , or SQL ...i can open another topic for each one of those languages
ok..so much for that lets tell you how to download JDK (Java Development Kit)
you should go to java.sun.com and you will see this title
The Source for Java Technology and 3 buttons below it ...choose the Standard Edition j2SE and and then to in the middle to your right hand you will see a button with J2SE Downloads and click on that one button which will take you to choose a version so click on J2SE 1.4.1
and then in the next list click on the second row , second cloumn opposite to Windows (all languages, including English) and under SDK
then it will ask for info about you if you do not want to get e-mails about updates do not pay any attention ...just click on no thanks continue and then the second page at the end click accept and then go theough the downloading process... i recommond putting the file .exe into the C drive you will have and then you will have to set the class path if you are running WXP here is the way to do it other wise follow the instrcuctions in the download page you just uded to download the JDK:
XP
go to the control panel......>click on system...> click on Advanced in the upper left corner....>then click on Environment variables button at the end of the wiondow....then in the second area of the new window look for path and click on it and in the variable value do not change or deletre any thing just go to the end of that whole line and type in : ;C:\name of the folder you just downloaded to the C drive\bin
do forget that there is a semicolon befor the C:\ so pay attention to it
and then click apply and restart your computer and now you should have it working so go to the MS-DOS and type in javac MyClass.java
of course it will give you an error so if the erroe is like
: could not fine file MyClass...congratulation you have it running
or id the error is like javac is not recognized.....there is an error and it might be that you did not put the name of the flder correctly so go again to the C disk and right click the foolder jdk..... and choose rename but do not rename it instesd copy that name and the click enter to return it back to its original name and then go to the same place in the path and paste that name where i said to be "the name of the folder you just downloaded and restart the computer again and that should work
i hope i did not make you confused and good luck if you have any problems plz post any question or e-mail me at QMAQMA@hotmail.com
Regards </div></span></font>
أحلى حلو
10-05-03 ||, 04:44 PM
<font color='#000080'>ياجماعه..
هل تعتقدون إن باستطاعكم أو بستطاعتنا <img src="http://oasis.bindubai.com/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'> تعلم الجافا بانواعها بهاي الطريقه !! <img src="http://oasis.bindubai.com/emoticons/rock.gif" border="0" valign="absmiddle" alt='???'>
نحن ندرس الجافا أبلتس والأدفانس دايركت من المدرس ويااااااااااالله يالله إنقببظ شي...
يعني اللي أقصده إن لازم اللي يشرح الجافا يشرحه سماعي ونظري بعد <img src="http://oasis.bindubai.com/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'>
ها..بكم الساعه ؟ <img src="http://oasis.bindubai.com/emoticons/tounge.gif" border="0" valign="absmiddle" alt=':p'></font>
بن دبي
11-05-03 ||, 03:28 AM
<font color='#FF0000'>Well .... I even can do that if you want we can open a room in Paltalk and we can talk and type at the same time , but by eyes....i do not think so man it is a littel sensetive ....not everybody want to show his face on the World Wide Web
and one more thing ... i would love to give lectures in Java to students ...that is why i am lookking for a job in one of the universities in the gulf to teach java because i am asked by the university which i study in to do 9 months of training so hope i can get one or if you can help me to get one that will be great.
Regards</font>
رويان
13-05-03 ||, 11:07 AM
<font color='#000000'><div align="left">el salaam 3aleekom
i would like to know what is the purpose of using the static option ? what does it do exactly
and
whats the difference between toString and toUniversalString?
we havent taken this class ---> java.io... so can u plz put examples using javax.swing?
and if its not too much i would like to ask about any tutorial sites where i can learn more codes..:)
i may post a question and ask u for the solution plz? is that ok with u <img src="http://oasis.bindubai.com/emoticons/lookaround.gif" border="0" valign="absmiddle" alt=':look:'>
thanx</div></font>
بن دبي
14-05-03 ||, 10:18 AM
<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>
أسيرة الصمت
23-05-03 ||, 01:05 AM
<font color='#000000'>ممكن مساعدة
ابغي شرح عن
abstract,interface,static
والبقية تأتي
والسموحة</font>
بن دبي
25-05-03 ||, 09:33 AM
<font color='#FF0000'><div align="left">sure man
abstract class is ageneric class that can be extended by other classes thst share some methods and behaviors. An abstract class has both concrete and abstract methods . the abstract methods are just defined by their names ; signature and there is nothing about their behaviors. so when a class extend that abstract class it defines its abstract methods as it wants. say for example we have a geometric class which have two methods ; get area and getvolume....as we all know that a circle and a rectangle are both geometric objects so both should extend that class but each one has a different way to calculate the area and the volume soo there we go.for the interface you implement the interface and you have to implement all its abstract methods..interfaces are more generic and all have constant variables and abstract methods ...for both those kind of classes we cannot instantiate them...we either extend them.....abstract ones;or implement them;;; interfaces
and man for the static key word i recommond reading the previous posts of mine and other members in this subjects
SALLAM NOW</div></font>
شوق القلوب
27-05-03 ||, 12:59 AM
<font color='#000000'>السلام عليكم....
اول شي... تشـــــــــــــــــــــكر .. اخوي صقر البوادي ع الخدمه الطيبه...
احنا المفروض الكورس اللي طاف... نحل واجباتنا ع الجافا.. بس لانه اغلبيتنا ما كنا انعرفها اتوهقنا وايد... وللحين احنا ما اتعلمنا شي...
وصراحه.. انا للحين ما قريت الشرح اللي كتبته... بس حبيت اسأل .. لو تابعنت الشرح... تتوقع اني بتعلم ولا لا.. كمبتدئه...؟؟
وسلمت... <img src="http://oasis.bindubai.com/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'></font>
بن دبي
31-05-03 ||, 03:44 AM
<font color='#FF0000'>Sallam Sorry for being late in respondinn..always busy with school
Well that's realy depends on you and youe willingness to read and learn..but let me tell you something...i only went over the basic things and then started to answer questions being posted by advanced people ,,though you can find the fundamental steps in the earliest posts in this topic and i think you have a good background to catch up ...if you have any problem just post your question and i will be glad to answer
Sallam now...</font>
شوق القلوب
02-06-03 ||, 02:37 AM
<font color='#000000'>شكـــــــــــــرا اخوي.. <img src="http://oasis.bindubai.com/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'>
وانشاء الله بتابع الموضوع...
بس من وين اقدر انزل الsoftware عشان ابدا في التطبيق..!</font>
بن دبي
02-06-03 ||, 10:15 AM
<font color='#FF0000'><div align="left">Sallam
Good Luck you will find the explanation for that in the earlier posts</div></font>
بدر الليل
08-06-03 ||, 06:52 AM
<font color='#000000'>انا فهمت كلمه سلام ..
واللي بعدها مادري شسالفته هههه <img src="http://oasis.bindubai.com/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'>
بس الظاهر تعبت على الموضوع مشكوور
يوم اخذ ها المساق برجع لك
بايو
بايو</font>
بن دبي
08-06-03 ||, 11:13 AM
<font color='#FF0000'>Any time Bro/Sis
Sallam to every one.</font>
بن دبي
12-06-03 ||, 01:18 AM
<font color='#FF0000'><div align="left">Sallam To All
I just wanned to let you know that i am still following this topic and ready to answer your question....So go For it</div></font>
بن دبي
30-09-03 ||, 07:40 AM
<font color='#FF0000'><p align=left><font face="times new roman, times, serif" color=#cc0000 size=4>sallam to all
hope you guys had a great vacation last summer...and another great academic year
as you may have noticed that this topic has slowly disappear over the summer period
basically cuz most of the students were in a vacation with the except of me -<img src="http://oasis.bindubai.com/emoticons/sad.gif" border="0" valign="absmiddle" alt=':('>..but
i am gonna start it again...hoping that somebody will be actually interested in the
service ...so yeah if any of you guys have any question or any problem in understanding
whatever concept in java programming ...i will be glad to try and solve it ...i will always
do my best to explain concepts and solve problems as quick as i can
by the way, keep in mind that i can not type in arabic ...so those who have difficulties
...........understanding my english...please excuse me
ready to start...let's kick the ball
peace for now. </font></p></font>
شوق القلوب
02-10-03 ||, 10:51 PM
<font color='#000000'>الســـلام عليــكم...
اول شي... مرحبابك مره ثانيــــه... <img src="http://oasis.bindubai.com/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'>
وثاني شي... احيي فيك هالروح الحلوه... والمســـاعده الجميله اللي اتقدمــها... <img src="http://oasis.bindubai.com/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'>
صحيح انا كنت في البدايه متشجعه اني اتعلمها بسبه الماده اللي كنت ماخذتنها... بس الحمد الله الكورس عدى على خيـــر ...
بس الحين طالعتلنا سالفه تعلم الـ vhdl ... وللحين احاول اقرى كتب عشان اتعلمها..
المهم..
الله يعطيك العافيه على هالمجهووود الطيب...
وربـــي يوفقك في دراســــتك... ويردك البلاد سالم...
تحيـــــــاتي... <img src="http://oasis.bindubai.com/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'></font>
بن دبي
03-10-03 ||, 04:27 AM
<font color='#FF0000'><p align=left><font color=#ff0000>w.sallam
many thanx for your encouraging comment up there. i am really happy to hear that you had excellently
passed the java course...hope everybody did/dose.i really have no experience in vhdl ..though i heared about
it ... must be engineering/software engineering stuff as i recall...keep the good work up and good luck
sallam now</font></p></font>