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

سؤال

مغلق
بدأه طارق بن زياد في 18 مايو 2003 · 4 رد · 764 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

كيف يمكنني القيام بإدخال وإخراج الأرقام في واجهات ال ++vj حاولت الكثير ولم أفلح وذلك لكوني مبتديء جددددددددددداً

ولكم الشكر والثواب

#2

خذ هذا الكود ربما يفيدك

/

** my best mail 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(".");
if((s1!= -1)&&(s2!=-1)&&(s1 {
System.out.print("congratiolation: This is vaild mail");
}
else{
System.out.print("Sorry: invaild mail");
}



}
}

فيه المستخدم يدخل الايميل جربه وافهمه

#3
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");
 }
}
}
اللهم انا نسألك علما نافعا ونعوذ بك من حماقة الجهلاء
#4

الأفضل للكلاس أن يبدأ بحرف كبير وليس هذا لازما!!!

#5

عندى فى jbuilder مش لازم حروف كبيرة

وشكرا اخى على التصحيح

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

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