Android Open Source - Joetz-Android-V2 My String Parser

From Project

Back to project page Joetz-Android-V2.


The source code is released under:

GNU General Public License

If you think the Android project Joetz-Android-V2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.jens.myapplication.domain.converter;
/*  www.ja va  2 s.  c om*/
 * Created by Sam on 8/11/2014.
public class MyStringParser {
     * Tries to parse a String into an integer, if it fails, it returns -1
     * @param value The string to be converted
     * @return
    public static int parseInt(String value){
            return Integer.parseInt(value);
        }catch(NumberFormatException e){
            return -1;

Java Source Code List