Results 1 to 4 of 4
  1. #1
    vulegend is offline Member
    Join Date
    Aug 2016
    Posts
    3
    Rep Power
    0

    Default What video games do you play?

    Hello guys, i'm a new guy around and i'm wondering what games do you guys play :D.

    I wanna meet the community around here.

  2. #2
    vulegend is offline Member
    Join Date
    Aug 2016
    Posts
    3
    Rep Power
    0

    Default Re: What video games do you play?

    /*
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    */
    package Prvi;

    /**
    *
    * @author student
    */
    public class Main {

    public String odstraniPrviiPoslednji(String s1)
    {
    if(s1.length() > 1)
    {
    StringBuilder strb = new StringBuilder();
    for(int i = 1; i < s1.length()-1; i++)
    {
    strb.append(s1.charAt(i));
    }

    return strb.toString();
    }
    else
    {
    return s1;
    }
    }


    public boolean daLiJePalindrom(String s,boolean palindrom)
    {
    if(s.length() == 1)
    {
    return palindrom;
    }

    if(s.charAt(0) == s.charAt(s.length()-1))
    {
    return daLiJePalindrom(odstraniPrviiPoslednji(s),true);
    }
    else
    {
    return false;
    }
    }

    public static void main(String[] args) {
    new Main();
    }

    public Main()
    {
    String test = "melem";
    if(daLiJePalindrom(test, false))
    System.out.println("JESTE PALINDROM!");
    else
    System.out.println("NIJE PALINDROM!");
    }

    }

  3. #3
    vulegend is offline Member
    Join Date
    Aug 2016
    Posts
    3
    Rep Power
    0

    Default Re: What video games do you play?

    /*
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    */
    package Drugi;

    import java.util.Stack;

    /**
    *
    * @author student
    */
    public class Main {

    public static void main(String[] args) {
    new Main();
    }

    public Stack pomocniStek;

    public void ubaciUStek(int vrednost,int i,Stack stek)
    {
    pomocniStek = new Stack();
    int velicina = stek.size();
    for(int j = 0; j < velicina-i; j++)
    {
    pomocniStek.push(stek.pop());
    }

    System.out.println(stek.peek());
    stek.push(vrednost);
    System.out.println(stek.peek());

    while(!pomocniStek.isEmpty())
    {
    stek.push(pomocniStek.pop());
    }

    }

    public Main()
    {
    Stack test = new Stack();
    test.push(1);
    test.push(5);
    test.push(3);
    ubaciUStek(15,1,test);

    while(!test.isEmpty())
    {
    System.out.println(test.pop());
    }

    }

    }

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    5,439
    Rep Power
    9

    Default Re: What video games do you play?

    Why are you posting this? Do you have a Java related question?

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. How to play a video into a java application
    By XxMK98xX in forum New To Java
    Replies: 20
    Last Post: 03-25-2015, 04:32 PM
  2. Play video from images
    By noname90 in forum Advanced Java
    Replies: 3
    Last Post: 11-30-2012, 02:23 PM
  3. Play A Video in JFrame
    By Godslug in forum AWT / Swing
    Replies: 1
    Last Post: 03-26-2012, 12:25 PM
  4. how to play a video from a file using jmf in a java
    By 200808147 in forum New To Java
    Replies: 0
    Last Post: 07-10-2011, 12:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •