Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** Returns the talker ID and sentence ID as a single String, ex: "GPGGA". */
    public static String getType(String nmeaSentence) {
        if (nmeaSentence != null && !nmeaSentence.isEmpty() && nmeaSentence.startsWith("$")) {
            return nmeaSentence.substring(1, 6);
        } else {
            return "Unknown";
        }
    }
}