الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف ألحق هذا الكلاس..

مغلق
بدأه smalljava في 19 أغسطس 2004 · 3 رد · 601 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

هذه أول مشاركة لي في منتداكم الرائع....

استخدم JBuilder4 في برمجة الجافا كمحرر وخلال قراءتي لأحد الكتب الإلكترونية لتعليم الجافا وضع رابط تحميل ملف جافا .. TextIO.java ...وبالفعل تم تحميل الملف علىجهازي ولكن كيف أحمل هذا الملف في المحرر JBuilder4 لاستخدامه والاستفادة منه؟؟

وشكراااااااااااااااا

#2

مرحبا بكي في منتداك .

حسب فهمي للسؤال.

أولا يجب ان تنشئي مشروع جديد ثم تضيفي له الكلاسات التي تريدين.

ولا تنسين اضافة [package في بداية الكلاس.

والله اعلم.

#3

أولاً : تفتحي الـ JBuilder بعدين File ثم open ثم تدوري على الملف في جهازك و تختاريه

و بعدين الزر في الأسفل open

بالتوفيق

الحياة كلها وقفة عز فقط

------------------------------------------

المجتمع معرفة و المعرفة قوة

#4

أشكر الأخوة على ردودهم

ولكن حتى يتضح المقصد اقتبس كلام المؤلف:

For example, I've written a class called TextIO that defines subroutines for reading values typed by the

user. The subroutines in this class make it possible to get input from the standard input object, System.in,

without knowing about the advanced aspects of Java that are needed to use System.in directly. TextIO

also contains a set of output subroutines. The output subroutines are similar to those provided in

System.out, but they provide a few additional features. You can use whichever set of output subroutines

you prefer, and you can even mix them in the same program.

To use the TextIO class, you must make sure that the class is available to your program. What this means

depends on the Java programming environment that you are using. See Appendix 2 for information about

programming environments. In general, you just have to add the compiled file, TextIO.class, to the

directory that contains your main program. You can obtain the compiled class file by compiling the source

code, TextIO.java.

The input routines in the TextIO class are static member functions. (Static member functions were

introduced in the previous section.) Let's suppose that you want your program to read an integer typed in by

the user. The TextIO class contains a static member function named getInt that you can use for this

purpose. Since this function is contained in the TextIO class, you have to refer to it in your program as

TextIO.getInt. The function has no parameters, so a call to the function takes the form

"TextIO.getInt()". This function call represents the int value typed by the user, and you have to do

something with the returned value, such as assign it to a variable. For example, if userInput is a variable

of type int (created with a declaration statement "int userInput;"), then you could use the

assignment statement

userInput = TextIO.getInt();

أرجو من الأخوة المساعدة وأن يكون الرد واضحا وجزيتم خيرا ..((أخوكم))

هذا الموضوع مغلق.

مواضيع مشابهة