集册 Java实例教程 从plus.Google.com网址https://plus.Google.com/118064008740771173119获取Google+ID

从plus.Google.com网址https://plus.Google.com/118064008740771173119获取Google+ID

欢马劈雪     最近更新时间:2020-01-02 10:19:05

355
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
从plus.google.com网址https://plus.google.com/118064008740771173119获取Google+ ID


//package com.nowjava;


public class Main {/** 来 自 n o w  j a v a  . c o m**/

    public static void main(String[] argv) throws Exception {

        String url = "nowjava.com";

        System.out.println(googlePlusIdFromUrl(url));

    }


    /**

     * Get the Google+ ID from a plus.google.com url

     * https://plus.google.com/118064008740771173119

     *

     * @param String url

     * @return String url

     */

    public static String googlePlusIdFromUrl(String url) {

        if (null == url) {

            return null;

        }
        /*
        时 代 J a v a 公 众 号 - nowjava.com
        */

        
展开阅读全文