قم بمتابعة الفيديو أدناه لمعرفة كيفية تثبيت موقعنا كتطبيق ويب على الشاشة الرئيسية.
ملاحظة: قد لا تكون هذه الميزة متاحة في بعض المتصفحات.
تصميم إيهــاب مصطفى
تصميم إيهــاب مصطفى
تصميم Ramy Badraan
تصميم Ramy Badraan
تصميم Ramy Badraan
[LEFT] package casting;
import javax.swing.*;
/**
*
* @author LEADER2008
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String number_str;
double number;
int cast;
number_str = JOptionPane.showInputDialog(null," أدخل عدد ");
number=(Integer.parseInt(number_str))/22.4;
cast=(int)number;
JOptionPane.showMessageDialog(null, " حاصل قسمة "+number_str+"على 22.4"+"\n"+number+"\n casting : \n"+ cast);
}
}
[/LEFT]
ما الخطا هنا
package personalinformation;
import javax.swing.*;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String Name,Job,Address,Status;
int Age,CellPhone,
JOptionPane.showMessageDialog(null,"Its a New Erra");
Name=JOptionPane.showInputMessage(null," What is Your Name?");
Job=JOptionPane.showInputMessage(null," Who Do You Work For? ");
Age=JOptionPane.showInputMessage(null," How Old Are You? ");
Address=JOptionPane.showInputMessage(null," Where Do Ypu Live? ");
Status=JOptionPane.showInputMessage(null," Are you Married Or Single");
Cellphone=JOptionPane.showInputMessage(null," Can I Have Your CellPhone Number ,pLease ?")
JOptionPane.showMessageDialog(null,"Im"+Name+"Live in"+Address+","+"Im "+Age+"and work as "+Job+",Finally,Im "+Status+".My CellPhone Number is: "+CellPhone+".");
JOptionPane.showMessageDialog(null,"Thanks alot, Data is saved successfully !");
JOptionPane.showMessageDialog(null,"Best Greetings. \n"+" Yours Sincerely,"+" AppleMAc");
[LEFT]import javax.swing.*;
/**
*
* @author LEADER2008
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String Name,Job,Address,Status;
int Age,CellPhone;
JOptionPane.showMessageDialog(null,"Its a New Erra");
Name=JOptionPane.showInputDialog(null," What is Your Name?");
Job=JOptionPane.showInputDialog(null," Who Do You Work For? ");
Age=Integer.parseInt(JOptionPane.showInputDialog(null," How Old Are You? "));
Address=JOptionPane.showInputDialog(null," Where Do Ypu Live? ");
Status=JOptionPane.showInputDialog(null," Are you Married Or Single");
CellPhone=Integer.parseInt(JOptionPane.showInputDialog(null," Can I Have Your CellPhone Number ,pLease ?"));
JOptionPane.showMessageDialog(null,"Im"+Name+"Live in"+Address+","+"Im "+Age+"and work as "+Job+",Finally,Im "+Status+".My CellPhone Number is: "+CellPhone+".");
JOptionPane.showMessageDialog(null,"Thanks alot, Data is saved successfully !");
JOptionPane.showMessageDialog(null,"Best Greetings. \n"+" Yours Sincerely,"+ "AppleMAc");
}
}
[/LEFT]
package personalinformation;
import javax.swing.*;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String Name,Job,Address,Status;
int Age,CellPhone;
String insage,inscell;
Age=Integer.parseInt(insage);
CellPhone=Integer.parseInt(inscell);
JOptionPane.showMessageDialog(null,"Its a New Erra");
Name=JOptionPane.showInputDialog(null," What is Your Name?");
Job=JOptionPane.showInputDialog(null," Who Do You Work For? ");
Age=JOptionPane.showInputDialog(" How Old Are You? ");
Address=JOptionPane.showInputDialog(null," Where Do Ypu Live? ");
Status=JOptionPane.showInputDialog(null," Are you Married Or Single");
CellPhone=JOptionPane.showInputDialog(" Can I Have Your CellPhone Number ,please ?");
JOptionPane.showMessageDialog(null,"Im"+Name+"Live in"+Address+","+"Im "+Age+"and work as "+Job+",Finally,Im "+Status+".My CellPhone Number is: "+CellPhone+".");
JOptionPane.showMessageDialog(null,"Thanks alot, Data is saved successfully !");
JOptionPane.showMessageDialog(null,"Best Greetings. \n"+" Yours Sincerely,"+" AppleMAc");
}
عدلت عليه وما زال هنااك خطأ
كود:package personalinformation; import javax.swing.*; public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { String Name,Job,Address,Status; int Age,CellPhone; String insage,inscell; Age=Integer.parseInt(insage); CellPhone=Integer.parseInt(inscell); JOptionPane.showMessageDialog(null,"Its a New Erra"); Name=JOptionPane.showInputDialog(null," What is Your Name?"); Job=JOptionPane.showInputDialog(null," Who Do You Work For? "); Age=JOptionPane.showInputDialog(" How Old Are You? "); Address=JOptionPane.showInputDialog(null," Where Do Ypu Live? "); Status=JOptionPane.showInputDialog(null," Are you Married Or Single"); CellPhone=JOptionPane.showInputDialog(" Can I Have Your CellPhone Number ,please ?"); JOptionPane.showMessageDialog(null,"Im"+Name+"Live in"+Address+","+"Im "+Age+"and work as "+Job+",Finally,Im "+Status+".My CellPhone Number is: "+CellPhone+"."); JOptionPane.showMessageDialog(null,"Thanks alot, Data is saved successfully !"); JOptionPane.showMessageDialog(null,"Best Greetings. \n"+" Yours Sincerely,"+" AppleMAc"); }
أخي الكريم لا شكر على واجب و تحيتي لك لـ
أنت استعملت طريقة أخرى
أنسخ هذا الكود و حاول المقارنة إن شاء الله صحيح
كود:[LEFT] public static void main(String[] args) { // TODO code application logic here [COLOR=Blue]String[/COLOR] [COLOR=DarkOrange]Name,Job,Address,Status,insage,inscell;[/COLOR] [COLOR=Blue]int[/COLOR] [COLOR=DarkGreen]Age,CellPhone[/COLOR]; JOptionPane.showMessageDialog(null,"Its a New Erra"); [COLOR=DarkOrange] insage[/COLOR]=JOptionPane.showInputDialog(null," How Old Are You? "); [COLOR=DarkGreen]Age[/COLOR]=Integer.parseInt(insage); [COLOR=DarkOrange] inscell[/COLOR]=JOptionPane.showInputDialog(null," Can I Have Your CellPhone Number ,please ?"); [COLOR=DarkGreen]CellPhone[/COLOR]=Integer.parseInt(inscell); //Age=Integer.parseInt(insage); [COLOR=DarkOrange]Name[/COLOR]=JOptionPane.showInputDialog(null," What is Your Name?"); [COLOR=DarkOrange]Job[/COLOR]=JOptionPane.showInputDialog(null," Who Do You Work For? "); //Age=JOptionPane.showInputDialog(" How Old Are You? "); [COLOR=DarkOrange] Address[/COLOR]=JOptionPane.showInputDialog(null," Where Do Ypu Live? "); [COLOR=DarkOrange]Status[/COLOR]=JOptionPane.showInputDialog(null," Are you Married Or Single"); //CellPhone=JOptionPane.showInputDialog(" Can I Have Your CellPhone Number ,please ?"); JOptionPane.showMessageDialog(null,"Im"+Name+"Live in"+Address+","+"Im "+Age+"and work as "+Job+",Finally,Im "+Status+".My CellPhone Number is: "+CellPhone+"."); JOptionPane.showMessageDialog(null,"Thanks alot, Data is saved successfully !"); JOptionPane.showMessageDialog(null,"Best Greetings. \n"+" Yours Sincerely,"+" AppleMAc"); } } [/LEFT] [RIGHT] [/RIGHT]
ملاحظة : أنت كنت قد عرفت متغيرين وسطيين جديدين و هما insage و inscell نوع string
و حينما تقوم بتحويل تستعمل عبارة قصيرة ليست كعبارتي طويلة و لكنها صحيحة فهذا لأنك أكثر منهجية و تنظيم مني :d:يجب عليك تسجيل الدخول او تسجيل لمشاهدة الرابط المخفي
يجب عليك تسجيل الدخول او تسجيل لمشاهدة الرابط المخفي
[LEFT]
public static void main(String[] args) {
// TODO code application logic here
String str1,str2;
Double n,n1,n2,n3,n4;
int n5;
str1=JOptionPane.showInputDialog(null,"الرجاء إدخال عدد");
str2=JOptionPane.showInputDialog( null,"الرجاء إدخال العدد الثاني ");
n1=Double.parseDouble(str1);
n2=Double.parseDouble(str2);
n=Math.pow(n1,n2);
n3=Math.sqrt(n);
n4=Math.random()*10;
JOptionPane.showMessageDialog(null, "حاصل "+" "+n1+" "+"قوة"+" "+n2+" "+"هــو" + " "+n);
JOptionPane.showMessageDialog(null, "الجذر التربيعي للعدد "+ " "+n+" "+"هو" +" "+n3);
JOptionPane.showMessageDialog(null,"عدد عشري عشوائي "+ " "+n4);
}
}
[/LEFT]