Search:

Type: Posts; User: eyalfish

Page 1 of 2 1 2

Search: Search took 0.15 seconds.

  1. Replies
    5
    Views
    98

    Re: i have a small problem in GUI

    Thank you solved:-):-)
  2. Replies
    5
    Views
    98

    Re: i have a small problem in GUI

    its returns null.
    newText dosent get the String input
  3. Replies
    5
    Views
    98

    i have a small problem in GUI

    Hi there,
    i am new to GUI and i will very appreciate your help.
    i create a JTextField and a Buttom("ok").and i want to get the String of the text after i push the button.

    what did i do wrong?
    ...
  4. Replies
    2
    Views
    151

    I cannot find my problem

    Hi everyone,

    File ff=new File("Questions.txt");
    Scanner f=new Scanner(ff);
    PrintWriter pq=new PrintWriter(ff);

    while(f.hasNext()){
    f.nextLine();
    }
  5. Replies
    0
    Views
    36

    whats wrong with this code please?

    String hex="7D";
    System.out.println(hexToDecimal(hex));
    }
    public static int hexToDecimal(String hex){
    int sum=0;int k=0;
    for(int i=hex.length()-1;i>=0;i--,k++){
    char...
  6. Replies
    3
    Views
    64

    Re: any idea?StringBuilder

    great i understoond and it works well via for loops.
    what isnt it working with my recursion:

    public static void switchLetters(StringBuilder str,int indexBegin,int indexEnd){
    StringBuilder...
  7. Replies
    3
    Views
    64

    any idea?StringBuilder

    Hello everyone,
    how can i replace each letter for example "abcde" to "edcba" with StringBuilder only and without the reverse tool:)
    this is what i tried:

    StringBuilder str=new...
  8. my first recursion ,what did i do wrong?

    public static boolean q8(int n){
    boolean check=true;

    if((n/10)<0){
    return check;
    }
    int f=n%10;
    int r=(n/10)%10;
    if((f%2==0)&&(r%2==0)){
    return check=false;
  9. Re: problem with understanding this recursion

    Thanks! Btw i didnt write the code i ordered to analayzed it.the value is indeed 952
  10. problem with understanding this recursion

    public static boolean goo(int n){
    If(n<10){
    Return n;
    }
    Int k=goo((n/100)*10+(n%10));
    Return (k*10 +(n%100)/10);

    }

    I am still a beginner to rec concept.
  11. Replies
    5
    Views
    114

    Re: How to create a text file?

    sorry i didnt find anything to make this text come to specific directory
  12. Replies
    5
    Views
    114

    How to create a text file?

    Hi everyone,
    this is what i tried(i tried a few things hope you would understand):

    File f=new File("c:/FilePractice/text.txt");
    f.mkdirs();

    and it creates only the folder text.txt.
    i am...
  13. Replies
    2
    Views
    56

    [SOLVED] Re: I need an advice

    Thanks Norm i just mistaken by the value .didnt see it
    This tread can be close thank you very much:)
  14. Replies
    2
    Views
    56

    [SOLVED] I need an advice

    Hi everybody ,
    can you guide me please what am i missing?
    so i create a class called Lecturer ,this is part of the code(of the class)

    private String name;
    private int numOfTimesPenFalls;...
  15. Replies
    0
    Views
    44

    [SOLVED] Need a little help,easy task

    nvm i understood:]
  16. Replies
    3
    Views
    191

    Re: Hi everyone i need some advice

    For(int i=0,j=1;i<=4;i+=2,j+=2){
    for(int k=i;k<=i;k++)
    Syso..print("*");
    For(int k=j;k<=j;k++)
    Syso..print(" ");
    }

    this is what i got the first line:
    *blank*blank*
  17. Replies
    3
    Views
    191

    Hi everyone i need some advice

    Hi,
    i need to create this shape:
    *" "*" "*
    " "*" "*" "
    " "" "*" "" "

    using loops.can you guide me on how to deal with the blank and asterisks?
    its just dont work correctly for me

    thanks...
  18. Replies
    9
    Views
    218

    Re: Again i need some advice please

    yes for array of example like i show{1 1 1 2 2}

    to matrix like that: 1 1 1
    2 2


    i count the number of different number=2.that's the row number.
    but how...
  19. Replies
    9
    Views
    218

    Re: Again i need some advice please

    yes it is sorted.
    i need to make a matrix from this array -each row different number and the times the number occuered
    1.i need to check how many numbers are different to determine how many rows i...
  20. Replies
    9
    Views
    218

    Re: Again i need some advice please

    int arr[]=new int[]{1,1,1,2,2};


    int row=2; //two different number=two rows
    int[][]matrix=new int[row][];
    for (int i=0;i<matrix.length;i++){
    for(int...
  21. Replies
    9
    Views
    218

    Re: Again i need some advice please

    You know what lets say i have an array of strings{"james","john","james","john","james"}

    I need to initialize a matrix that each row contain a different name.

    --- Update ---

    The output will...
  22. Replies
    9
    Views
    218

    Again i need some advice please

    Sorry to bother you that much.
    I have a project that contain an array of people(each index contain name,salary and id number).
    i need to make a matrix that each name will be in a new row.
    so i did...
  23. Re: Hi everyone i stuck at something and i need a little help please

    You are a king!!!!!!!!!!!!!!!
    thank you thank you:]
  24. Re: Hi everyone i stuck at something and i need a little help please

    This my code:

    Scanner s=new Scanner(System.in);
    int Id=0;String Name="";int Salary=0;


    for (int i=0;i<arr.length;i++){

    Employee temp=new Employee(Id,Name,Salary);...
  25. Re: Hi everyone i stuck at something and i need a little help please

    I need to create array and input value in this order:int id(integer),String name(must be nextline),int salary(integer).
    i fount that if i do s.nextline after the name=s.nextline it fix this....
Results 1 to 25 of 36
Page 1 of 2 1 2