السلام عليكم ورحمة الله وبركاته
كيف يمكنني القيام بإدخال وإخراج الأرقام في واجهات ال ++vj حاولت الكثير ولم أفلح وذلك لكوني مبتديء جددددددددددداً
ولكم الشكر والثواب
السلام عليكم ورحمة الله وبركاته
كيف يمكنني القيام بإدخال وإخراج الأرقام في واجهات ال ++vj حاولت الكثير ولم أفلح وذلك لكوني مبتديء جددددددددددداً
ولكم الشكر والثواب
خذ هذا الكود ربما يفيدك
/
فيه المستخدم يدخل الايميل جربه وافهمه
Your Error in Classname the Classname mus started with Capitel
Correct Program
import java.io.*; // include the DataInputStrem
class Email3 {
public static void main(String[] args) throws IOException{
/* the 3 following line to make the user able to enter from K.B*/
DataInputStream is = new DataInputStream(System.in);
System.out.println("plz enter your mail");
String s = is.readLine();
int s1,s2,s3;
s1 = s.indexOf("@");
s2 = s.indexOf(".");
s3= s.indexOf(" ");
if((s1!= -1)&&(s2!=-1)&&(s3==-1)&&s.length()>5) // test if this valid mail or not
{
System.out.println("congratiolation: This is vaild mail");
}
else{
System.out.println("Sorry: invaild mail");
}
}
}الأفضل للكلاس أن يبدأ بحرف كبير وليس هذا لازما!!!
عندى فى jbuilder مش لازم حروف كبيرة
وشكرا اخى على التصحيح
هذا الموضوع مغلق.