zoukankan      html  css  js  c++  java
  • java url demo

    // File Name : URLDemo.java
    
    import java.net.*;
    import java.io.*;
    
    public class URLDemo
    {
       public static void main(String [] args)
       {
          try
          {
             URL url = new URL("http://www.amrood.com/index.htm?language=en#j2se");
             
             System.out.println("URL is " + url.toString());
             System.out.println("protocol is " + url.getProtocol());
             System.out.println("authority is " + url.getAuthority());
             System.out.println("file name is " + url.getFile());
             System.out.println("host is " + url.getHost());
             System.out.println("path is " + url.getPath());
             System.out.println("port is " + url.getPort());
             System.out.println("default port is " + url.getDefaultPort());
             System.out.println("query is " + url.getQuery());
             System.out.println("ref is " + url.getRef());
          }catch(IOException e)
          {
             e.printStackTrace();
          }
       }
    }
    

      输出:

    URL is http://www.amrood.com/index.htm?language=en#j2se
    protocol is http
    authority is www.amrood.com
    file name is /index.htm?language=en
    host is www.amrood.com
    path is /index.htm
    port is -1
    default port is 80
    query is language=en
    ref is j2se
    

      java 访问url

    // File Name : URLConnDemo.java
    
    import java.net.*;
    import java.io.*;
    public class URLConnDemo
    {
       public static void main(String [] args)
       {
          try
          {
             URL url = new URL("http://www.tutorialspoint.com/java/java_url_processing.htm");
             URLConnection urlConnection = url.openConnection();
             HttpURLConnection connection = null;
             if(urlConnection instanceof HttpURLConnection)
             {
                connection = (HttpURLConnection) urlConnection;
             }
             else
             {
                System.out.println("Please enter an HTTP URL.");
                return;
             }
             BufferedReader in = new BufferedReader(
             new InputStreamReader(connection.getInputStream()));
             String urlString = "";
             String current;
             while((current = in.readLine()) != null)
             {
                urlString += current;
             }
             System.out.println(urlString);
          }catch(IOException e)
          {
             e.printStackTrace();
          }
       }
    }
    

      输出:

    <!DOCTYPE html><!--[if IE 8]><html class="ie ie8"> <![endif]--><!--[if IE 9]><html class="ie ie9"> <![endif]--><!--[if gt IE 9]><!-->	<html> <!--<![endif]--><head><!-- Basic --><meta charset="utf-8"><title>Java - URL Processing</title><meta name="description" content="Java URL Processing - Learning Java in simple and easy steps : A beginner's tutorial containing complete knowledge of Java Syntax Object Oriented Language, Methods, Overriding, Inheritance, Polymorphism, Interfaces, Packages, Collections, Networking, Multithreading, Generics, Multimedia, Serialization, GUI." /><meta name="keywords" content="Java, Tutorials, Learning, Beginners, Basics, Object Oriented Language, Methods, Overriding, Inheritance, Polymorphism, Interfaces, Packages, Collections, Networking, Multithreading, Generics, Multimedia, Serialization, GUI." /><base href="http://www.tutorialspoint.com/" /><link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /><meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes"><meta property="og:locale" content="en_US" /><meta property="og:type" content="website" /><meta property="fb:app_id" content="471319149685276" /><meta property="og:site_name" content="www.tutorialspoint.com" /><meta name="robots" content="index, follow"/><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="author" content="tutorialspoint.com"><script type="text/javascript" src="/theme/js/script-min-v4.js"></script><link rel="stylesheet" href="/theme/css/style-min.css"><!-- Head Libs --><!--[if IE 8]><link rel="stylesheet" type="text/css" href="/theme/css/ie8.css"><![endif]--><style>.fa-camera:before{content:"f03d";font-family:FontAwesome;font-style:normal;font-size:100%}pre.prettyprint.tryit {min-height:37px; background: #eee url(java/images/try-it.jpg) top right no-repeat !important}div.feature-box div.feature-box-icon, .col-md-3 .course-box, li.heading, div.footer-copyright { background: #eb4847 url(/images/pattern.png) repeat center center !important;}.sub-main-menu .sub-menuu div:hover, .sub-main-menu .viewall, header nav ul.nav-main li a:hover, button.btn-responsive-nav, header div.search button.btn-default { background: #eb4847 !important;}.submenu-item{ border-bottom: 2px solid #eb4847 !important; border-top: 2px solid #eb4847 !important }</style><script>$(document).ready(function() {  $('input[name="q"]').keydown(function(event){    if(event.keyCode == 13) {      event.preventDefault();      return false;    }  });});</script></head><body onload="prettyPrint()"><div class="wrapLoader">   <div class="imgLoader">      <img  src="/images/loading-cg.gif" alt="" width="70" height="70" />   </div></div><header>   <div class="submenu-item sub-main-menu" id="top-sub-menu"></div>   <div class="container">			      <h1 class="logo">      <a href="index.htm" title="tutorialspoint">      <img alt="tutorialspoint" src="/java/images/logo.png">      </a>      </h1><!-- We are hiring  STARTS --><div style="position:relative;top:-20px; left:400px;"><ul style="list-style-type: none"><li> <a  href="about/about_careers.htm" style="background: #f7e75d; padding:5px;"><i class="icon icon-suitcase"></i> We are hiring</a> </li>   </ul></div><!-- We are hiring  END -->      <button class="btn btn-responsive-nav btn-inverse" data-toggle="collapse" data-target=".nav-main-collapse" id="pull"> <i class="icon icon-bars"></i> </button>      <div class="navbar nav-main">      <div class="container">         <nav class="nav-main mega-menu" style="top:-28px;">            <ul class="nav nav-pills nav-main" id="mainMenu">               <li class="dropdown no-sub-menu"> <a class="dropdown" href="index.htm"><i class="icon icon-home"></i> Home</a> </li>                  <li class="dropdown" id="liTL"><a class="dropdown" href="javascript:void(0);"><span class="tut-lib"> Tutorials Library  <i class="fa-caret-down"></i></span></a></li>               <li class="dropdown no-sub-menu"><a class="dropdown" href="codingground.htm"><i class="fa-code"></i> Coding Ground </a> </li>               <li class="dropdown no-sub-menu"><a class="dropdown" href="tutor_connect/index.php"><i class="fa-user"> </i> Tutor Connect</a></li>               <li class="dropdown no-sub-menu"><a class="dropdown" href="https://www.send18.com/" target="_blank"><i class="fa-paper-plane-o"> </i> Send18</a></li>               <li class="dropdown no-sub-menu"><a class="dropdown" href="online_dev_tools.htm"><span class="dev-tools-menu">  Tools</span></a></li>             </ul>         </nav>         <div class="searchform-popup" style="top:0px;">            <input class='header-search-box' type='text' id='search-string' name="q" placeholder="Search your favorite tutorials..." onfocus="if (this.value == 'Search your favorite tutorials...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search your favorite tutorials...';}" autocomplete="off"/>            <div class="magnifying-glass"><i class="icon-search"></i> Search </div>        </div>      </div>     </div>	</header><div style="clear:both;"></div><div role="main" class="main"><div class="container"><div class="row"><div class="col-md-2"><aside class="sidebar"><div class="mini-logo"><img src="/java/images/java-mini-logo.jpg" alt="Java Tutorial" /></div><ul class="nav nav-list primary left-menu" ><li class="heading">Java Tutorial</li><li><a target="_top" href="/java/index.htm">Java - Home</a></li><li><a target="_top" href="/java/java_overview.htm">Java - Overview</a></li><li><a target="_top" href="/java/java_environment_setup.htm">Java - Environment Setup</a></li><li><a target="_top" href="/java/java_basic_syntax.htm">Java - Basic Syntax</a></li><li><a target="_top" href="/java/java_object_classes.htm">Java - Object & Classes</a></li><li><a target="_top" href="/java/java_basic_datatypes.htm">Java - Basic Datatypes</a></li><li><a target="_top" href="/java/java_variable_types.htm">Java - Variable Types</a></li><li><a target="_top" href="/java/java_modifier_types.htm">Java - Modifier Types</a></li><li><a target="_top" href="/java/java_basic_operators.htm">Java - Basic Operators</a></li><li><a target="_top" href="/java/java_loop_control.htm">Java - Loop Control</a></li><li><a target="_top" href="/java/java_decision_making.htm">Java - Decision Making</a></li><li><a target="_top" href="/java/java_numbers.htm">Java - Numbers</a></li><li><a target="_top" href="/java/java_characters.htm">Java - Characters</a></li><li><a target="_top" href="/java/java_strings.htm">Java - Strings</a></li><li><a target="_top" href="/java/java_arrays.htm">Java - Arrays</a></li><li><a target="_top" href="/java/java_date_time.htm">Java - Date & Time</a></li><li><a target="_top" href="/java/java_regular_expressions.htm">Java - Regular Expressions</a></li><li><a target="_top" href="/java/java_methods.htm">Java - Methods</a></li><li><a target="_top" href="/java/java_files_io.htm">Java - Files and I/O</a></li><li><a target="_top" href="/java/java_exceptions.htm">Java - Exceptions</a></li><li><a target="_top" href="/java/java_innerclasses.htm">Java - Inner classes</a></li></ul><ul class="nav nav-list primary left-menu" ><li class="heading">Java Object Oriented</li><li><a target="_top" href="/java/java_inheritance.htm">Java - Inheritance</a></li><li><a target="_top" href="/java/java_overriding.htm">Java - Overriding</a></li><li><a target="_top" href="/java/java_polymorphism.htm">Java - Polymorphism</a></li><li><a target="_top" href="/java/java_abstraction.htm">Java - Abstraction</a></li><li><a target="_top" href="/java/java_encapsulation.htm">Java - Encapsulation</a></li><li><a target="_top" href="/java/java_interfaces.htm">Java - Interfaces</a></li><li><a target="_top" href="/java/java_packages.htm">Java - Packages</a></li></ul><ul class="nav nav-list primary left-menu" ><li class="heading">Java Advanced</li><li><a target="_top" href="/java/java_data_structures.htm">Java - Data Structures</a></li><li><a target="_top" href="/java/java_collections.htm">Java - Collections</a></li><li><a target="_top" href="/java/java_generics.htm">Java - Generics</a></li><li><a target="_top" href="/java/java_serialization.htm">Java - Serialization</a></li><li><a target="_top" href="/java/java_networking.htm">Java - Networking</a></li><li><a target="_top" href="/java/java_sending_email.htm">Java - Sending Email</a></li><li><a target="_top" href="/java/java_multithreading.htm">Java - Multithreading</a></li><li><a target="_top" href="/java/java_applet_basics.htm">Java - Applet Basics</a></li><li><a target="_top" href="/java/java_documentation.htm">Java - Documentation</a></li></ul><ul class="nav nav-list primary left-menu" ><li class="heading">Java Useful Resources</li><li><a target="_top" href="/java/java_questions_answers.htm">Java - Questions and Answers</a></li><li><a target="_top" href="/java/java_quick_guide.htm">Java - Quick Guide</a></li><li><a target="_top" href="/java/java_useful_resources.htm">Java - Useful Resources</a></li><li><a target="_top" href="/java/java_discussion.htm">Java - Discussion</a></li><li><a target="_top" href="/javaexamples/index.htm">Java - Examples</a></li></ul><ul class="nav nav-list primary push-bottom left-menu special"><li class="sreading">Selected Reading</li><li><a target="_top" href="/developers_best_practices/index.htm">Developer's Best Practices</a></li><li><a target="_top" href="/questions_and_answers.htm">Questions and Answers</a></li><li><a target="_top" href="/effective_resume_writing.htm">Effective Resume Writing</a></li><li><a target="_top" href="/hr_interview_questions/index.htm">HR Interview Questions</a></li><li><a target="_top" href="/computer_glossary.htm">Computer Glossary</a></li><li><a target="_top" href="/computer_whoiswho.htm">Who is Who</a></li></ul></aside></div><!-- PRINTING STARTS HERE --><div class="row"><div class="content"><div class="col-md-7 middle-col"><h1>Java - URL Processing</h1><div class="topgooglead"><hr /><div style="padding-bottom:5px;padding-left:10px;">Advertisements</div><script type="text/javascript"><!--google_ad_client = "pub-7133395778201029";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "image";google_ad_channel = "";//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div><hr /><div class="pre-btn"><a href="/java/java_networking.htm"><i class="icon icon-arrow-circle-o-left big-font"></i> Previous Page</a></div><div class="nxt-btn"><a href="/java/java_networking.htm">Next Page <i class="icon icon-arrow-circle-o-right big-font"></i> </a></div><div class="clearer"></div><hr /><p>URL stands for Uniform Resource Locator and represents a resource on the World Wide Web, such as a Web page or FTP directory.</p><p>This section shows you how to write Java programs that communicate with a URL. A URL can be broken down into parts, as follows:</p><pre class="prettyprint notranslate">protocol://host:port/path?query#ref</pre><p>Examples of protocols include HTTP, HTTPS, FTP, and File. The path is also referred to as the filename, and the host is also called theauthority.</p><p>The following is a URL to a Web page whose protocol is HTTP:</p><pre class="prettyprint notranslate">http://www.amrood.com/index.htm?language=en#j2se</pre><p>Notice that this URL does not specify a port, in which case the default port for the protocol is used. With HTTP, the default port is 80.</p><h2>URL Class Methods:</h2><p>The <b>java.net.URL</b> class represents a URL and has complete set of methods to manipulate URL in Java.</p><p>The URL class has several constructors for creating URLs, including the following:</p><table class="table table-bordered"><tr><th>SN</th><th>Methods with Description</th></tr><tr><td>1</td><td><b>public URL(String protocol, String host, int port, String file) throws MalformedURLException.</b><br />Creates a URL by putting together thegiven parts.</td></tr><tr><td>2</td><td><b>public URL(String protocol, String host, String file) throws MalformedURLException</b><br />Identical to the previous constructor, except that the default port for the given protocol is used.</td></tr><tr><td>3</td><td><b>public URL(String url) throws MalformedURLException</b><br />Creates a URL from the given String</td></tr><tr><td>4</td><td><b>public URL(URL context, String url) throws MalformedURLException</b><br />Creates a URL by parsing the together the URL and String arguments</td></tr></table><p>The URL class contains many methods for accessing the various parts of the URL being represented. Some of the methods in the URL class include the following:</p><table class="table table-bordered"><tr><th>SN</th><th>Methods with Description</th></tr><tr><td>1</td><td><b>public String getPath()</b><br />Returns the path of the URL.</td></tr><tr><td>2</td><td><b>public String getQuery()</b><br />Returns the query part of the URL.</td></tr><tr><td>3</td><td><b>public String getAuthority()</b><br />Returns the authority of the URL.</td></tr><tr><td>4</td><td><b>public int getPort()</b><br />Returns the port of the URL.</td></tr><tr><td>5</td><td><b>public int getDefaultPort()</b><br />Returns the default port for the protocol of the URL.</td></tr><tr><td>6</td><td><b>public String getProtocol()</b><br />Returns the protocol of the URL.</td></tr><tr><td>7</td><td><b>public String getHost()</b><br />Returns the host of the URL.</td></tr><tr><td>8</td><td><b>public String getHost()</b><br />Returns the host of the URL.</td></tr><tr><td>9</td><td><b>public String getFile()</b><br />Returns the filename of the URL.</td></tr><tr><td>10</td><td><b>public String getRef()</b><br />Returns the reference part of the URL.</td></tr><tr><td>11</td><td><b>public URLConnection openConnection() throws IOException</b><br />Opens a connection to the URL, allowing a client to communicate with the resource.</td></tr></table><h2>Example:</h2><p>The following URLDemo program demonstrates the various parts of a URL. A URL is entered on the command line, and the URLDemo program outputs each part of the given URL.</p><pre class="prettyprint notranslate tryit">// File Name : URLDemo.javaimport java.net.*;import java.io.*;public class URLDemo{   public static void main(String [] args)   {      try      {         URL url = new URL("http://www.amrood.com/index.htm?language=en#j2se");                  System.out.println("URL is " + url.toString());         System.out.println("protocol is " + url.getProtocol());         System.out.println("authority is " + url.getAuthority());         System.out.println("file name is " + url.getFile());         System.out.println("host is " + url.getHost());         System.out.println("path is " + url.getPath());         System.out.println("port is " + url.getPort());         System.out.println("default port is " + url.getDefaultPort());         System.out.println("query is " + url.getQuery());         System.out.println("ref is " + url.getRef());      }catch(IOException e)      {         e.printStackTrace();      }   }}</pre><p>A sample run of the this program would produce the following result:</p><pre class="result notranslate">URL is http://www.amrood.com/index.htm?language=en#j2seprotocol is httpauthority is www.amrood.comfile name is /index.htm?language=enhost is www.amrood.compath is /index.htmport is -1default port is 80query is language=enref is j2se</pre><h2>URLConnections Class Methods:</h2><p>The openConnection() method returns a <b>java.net.URLConnection</b>, an abstract class whose subclasses represent the various types of URL connections.</p><p>For example:</p><ul class="list"><li><p>If you connect to a URL whose protocol is HTTP, the openConnection() method returns an HttpURLConnection object.</p></li><li><p>If you connect to a URL that represents a JAR file, the openConnection() method returns a JarURLConnection object.</p></li><li><p>etc...</p></li></ul><p>The URLConnection class has many methods for setting or determining information about the connection, including the following:</p><table class="table table-bordered"><tr><th>SN</th><th>Methods with Description</th></tr><tr><td>1</td><td><b>Object getContent() </b><br />Retrieves the contents of this URL connection.</td></tr><tr><td>2</td><td><b>Object getContent(Class[] classes) </b><br />Retrieves the contents of this URL connection.</td></tr><tr><td>3</td><td><b>String getContentEncoding() </b><br /> Returns the value of the content-encoding header field.</td></tr><tr><td>4</td><td><b>int getContentLength() </b><br />Returns the value of the content-length header field.</td></tr><tr><td>5</td><td><b>String getContentType() </b><br />Returns the value of the content-type header field.</td></tr><tr><td>6</td><td><b>int getLastModified() </b><br />Returns the value of the last-modified header field.</td></tr><tr><td>7</td><td><b>long getExpiration() </b><br />Returns the value of the expires header field.</td></tr><tr><td>8</td><td><b>long getIfModifiedSince() </b><br />Returns the value of this object's ifModifiedSince field.</td></tr><tr><td>9</td><td><b>public void setDoInput(boolean input)</b><br />Passes in true to denote that the connection will be used for input. The default value is true becauseclients typically read from a URLConnection.</td></tr><tr><td>10</td><td><b>public void setDoOutput(boolean output)</b><br />Passes in true to denote that the connection will be used for output. The default value is false because many types of URLs do not support being written to.</td></tr><tr><td>11</td><td><b>public InputStream getInputStream() throws IOException</b><br />Returns the input stream of the URL connection for reading from the resource.</td></tr><tr><td>12</td><td><b>public OutputStream getOutputStream() throws IOException</b><br />Returns the output stream of the URL connection for writing to the resource</td></tr><tr><td>13</td><td><b>public URL getURL()</b><br />Returns the URL that this URLConnection object is connected to</td></tr></table><h2>Example:</h2><p>The following URLConnectionDemo program connects to a URL entered from the command line.</p><p>If the URL represents an HTTP resource, the connection is cast to HttpURLConnection, and the data in the resource is read one line at a time.</p><pre class="prettyprint notranslate tryit">// File Name : URLConnDemo.javaimport java.net.*;import java.io.*;public class URLConnDemo{   public static void main(String [] args)   {      try      {         URL url = new URL("http://www.amrood.com");         URLConnection urlConnection = url.openConnection();         HttpURLConnection connection = null;         if(urlConnection instanceof HttpURLConnection)         {            connection = (HttpURLConnection) urlConnection;         }         else         {            System.out.println("Please enter an HTTP URL.");            return;         }         BufferedReader in = new BufferedReader(         new InputStreamReader(connection.getInputStream()));         String urlString = "";         String current;         while((current = in.readLine()) != null)         {            urlString += current;         }         System.out.println(urlString);      }catch(IOException e)      {         e.printStackTrace();      }   }}</pre><p>A sample run of the this program would produce the following result:</p><pre class="result notranslate">$ java URLConnDemo.....a complete HTML content of home page of amrood.com.....</pre><hr /><div class="pre-btn"><a href="/java/java_networking.htm"><i class="icon icon-arrow-circle-o-left big-font"></i> Previous Page</a></div><div class="print-btn center"><a href="/cgi-bin/printpage.cgi" target="_blank"><i class="icon icon-print big-font"></i> Print</a></div><div class="pdf-btn"><a href="/java/pdf/java_url_processing.pdf" title="Java - URL Processing" target="_blank"><i class="icon icon-file-pdf-o big-font"></i> PDF</a></div><div class="nxt-btn"><a href="/java/java_networking.htm">Next Page <i class="icon icon-arrow-circle-o-right big-font"></i> </a></div><div class="parent-file">java_networking.htm</div><hr /><!-- PRINTING ENDS HERE --><div class="bottomgooglead"><div class="bottomadtag">Advertisements</div><script type="text/javascript"><!--var width = 580;var height = 400;var format = "580x400_as";if( window.innerWidth < 468 ){   width = 300;   height = 250;   format = "300x250_as";}google_ad_client = "pub-7133395778201029";google_ad_width = width;google_ad_height = height;google_ad_format = format;google_ad_type = "image";google_ad_channel ="";//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></div></div><div class="row"><div class="col-md-3" id="rightbar"><div class="simple-ad"><a href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('http://www.facebook.com/sharer.php?u=' + 'http://www.tutorialspoint.com/java/java_url_processing.htm','sharer','toolbar=0,status=0,width=626,height=456,top='+sTop+',left='+sLeft);return false;"><img src="/images/facebookIcon.jpg" alt="img" /></a><a  href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('http://twitter.com/share?url=' + 'http://www.tutorialspoint.com/java/java_url_processing.htm','sharer','toolbar=0,status=0,width=626,height=456,top='+sTop+',left='+sLeft);return false;"><img src="/images/twitterIcon.jpg" alt="img" /></a><a  href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('https://www.linkedin.com/cws/share?url=' + 'http://www.tutorialspoint.com/java/java_url_processing.htm&title='+ document.title,'sharer','toolbar=0,status=0,width=626,height=456,top='+sTop+',left='+sLeft);return false;"><img src="/images/linkedinIcon.jpg" alt="img" /></a><a  href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('https://plus.google.com/share?url=http://www.tutorialspoint.com/java/java_url_processing.htm','sharer','toolbar=0,status=0,width=626,height=456,top='+sTop+',left='+sLeft);return false;"><img src="/images/googlePlusIcon.jpg" alt="img" /></a><a  href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('http://www.stumbleupon.com/submit?url=http://www.tutorialspoint.com/java/java_url_processing.htm&title='+ document.title,'sharer','toolbar=0,status=0,width=626,height=456,top='+sTop+',left='+sLeft);return false;"><img src="/images/StumbleUponIcon.jpg" alt="img" /></a><a  href="javascript:void(0)" onclick="var sTop = window.screen.height/2-(218); var sLeft = window.screen.width/2-(313);window.open('http://reddit.com/submit?url=http://www.tutorialspoint.com/java/java_url_processing.htm&title='+ document.title,'sharer','toolbar=0,status=0,width=626,height=656,top='+sTop+',left='+sLeft);return false;"><img src="/images/reddit.jpg" alt="img" /></a></div><div class="rightgooglead"><script type="text/javascript"><!--google_ad_client = "pub-7133395778201029";google_ad_width = 300;google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = "image";google_ad_channel ="";//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><div class="rightgooglead"><script type="text/javascript"><!--google_ad_client = "pub-7133395778201029";google_ad_width = 300;google_ad_height = 600;google_ad_format = "300x600_as";google_ad_type = "image";google_ad_channel ="";//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><div class="rightgooglead"><script type="text/javascript"><!--google_ad_client = "ca-pub-2537027957187252";/* Right Side Ad */google_ad_slot = "right_side_ad";google_ad_width = 300;google_ad_height = 250;//--></script><script type="text/javascript"src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></div></div></div></div></div><div class="footer-copyright"><div class="container"><div class="row"><div class="col-md-1"><a href="index.htm" class="logo"> <img alt="Tutorials Point" class="img-responsive" src="/scripts/img/logo-footer.png"> </a></div><div class="col-md-4 col-sm-12 col-xs-12">   <nav id="sub-menu">      <ul>         <li><a href="/about/tutorials_writing.htm">Write for us</a></li>         <li><a href="/about/faq.htm">FAQ's</a></li>         <li><a href="/about/about_helping.htm">Helping</a></li>         <li><a href="/about/contact_us.htm">Contact</a></li>      </ul>   </nav></div><div class="col-md-3 col-sm-12 col-xs-12"><p>© Copyright 2016. All Rights Reserved.</p></div><div class="col-md-4 col-sm-12 col-xs-12">   <div class="news-group">      <input type="text" class="form-control-foot search" name="textemail" id="textemail" autocomplete="off" placeholder="Enter email for newsletter" onfocus="if (this.value == 'Enter email for newsletter...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Enter email for newsletter...';}">      <span class="input-group-btn"> <button class="btn btn-default btn-footer" id="btnemail" type="submit" onclick="javascript:void(0);">go</button> </span>      <div id="newsresponse"></div>   </div></div></div></div></div></div><!-- Libs --><script type="text/javascript" src="/theme/js/custom-min.js"></script><script src="http://www.google-analytics.com/urchin.js"></script><script type="text/javascript">_uacct = "UA-232293-6";urchinTracker();$('.pg-icon').click(function(){   $('.wrapLoader').show();});</script><script type="text/javascript" src="/theme/js/jquery.colorbox-min.js"></script><script type="text/javascript">   var tryit = new $.TryIt('java/try_java.php');   tryit.compile();</script></div></body></html>
    

      

  • 相关阅读:
    Java实现 蓝桥杯VIP 算法训练 字符串逆序
    Java实现 蓝桥杯VIP 算法训练 字符串逆序
    Java实现 蓝桥杯VIP 算法训练 最长字符串
    Java实现 蓝桥杯VIP 算法训练 最长字符串
    Java实现 蓝桥杯VIP 算法训练 最长字符串
    Java实现 蓝桥杯VIP 算法训练 最长字符串
    Java实现 蓝桥杯VIP 算法训练 最长字符串
    Java实现 蓝桥杯VIP 算法训练 成绩的等级输出
    Java实现 蓝桥杯VIP 算法训练 成绩的等级输出
    Qt 自定义model实现文件系统的文件名排序
  • 原文地址:https://www.cnblogs.com/yuanzhenliu/p/5761668.html
Copyright © 2011-2022 走看看