生日快樂java代碼,生日快樂Java代碼

今天我女朋友的生日誰給段漂亮的祝福生日快樂的Java代碼 無限感激

用java寫的話 要做得很好 已經(jīng)來不及了

站在用戶的角度思考問題,與客戶深入溝通,找到濠江網(wǎng)站設(shè)計(jì)與濠江網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、國際域名空間、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋濠江地區(qū)。

我建議你用ZineMaker 2006做一個(gè)雜志 可以做得很漂亮 可以加她照片、背景音樂加特殊效果等等 她看見了肯定會感動的

這里一個(gè)常見的 也給你

html

head

title一切皆有可能/title!--這里是標(biāo)題--

hta:application sysmenu=no scroll=no border=none

script language="vc"

sub sub1

me.close

end sub

me.resizeto 500,410 '這里設(shè)置窗口大小,單位為像素

me.moveto 260,100 '這里設(shè)置窗口位置,單位為像素

window.settimeout "sub1",100000 '這是設(shè)置時(shí)間,單位為毫秒,我這里設(shè)置為12秒

/script

body

CENTER

FONT style="COLOR:#33FF00; FILTER: shadow(color=black); FONT-FAMILY: 華文彩云; FONT-SIZE: 30pt; LINE-HEIGHT: 150%; WIDTH: 100%"B一切皆有可能/B/FONT/CENTER

hr

style type="text/css"

.3dfont { FILTER: glow(color=ffffff,strength=0) shadow(color=cccccc,direction:135); POSITION: relative; WIDTH: 100% }

/style

table border="0" width="100%"

tr

td width="100%" class="3dfont"font color=REDCENTER ☆☆☆☆☆☆ 獻(xiàn)給最親愛的你 ☆☆☆☆☆☆/font

br

P align=left

★一切皆有可能!/Bbrbr

一切皆有可能!/Bbrbr

MARQUEE希望大家多多支持!??!/body

/html

java編寫一個(gè)簡單的輸入生日計(jì)算下一個(gè)生日時(shí)間的代碼?

import java.util.Calendar;

import java.util.Scanner;

import java.util.concurrent.TimeUnit;

/**

* Title: Test03.javabr

* Description:

*

* @author 王凱芳

* @date 2020年3月5日 下午6:03:04

* @version 1.0

*

* @request 編寫一個(gè)方法能計(jì)算任何一個(gè)人今天離他最近下一次生日還有多少天,然后在主方法(main方法)中輸入你的出生年月日,調(diào)用該方法的計(jì)算結(jié)果并輸出信息“某某同學(xué)離自己最近下一次生日x天”。

*/

public class Test03 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println("請輸入你的姓名:");

String name = sc.nextLine();

System.out.println("請輸入你的生日,格式為(2000/01/01):");

String line = sc.nextLine();

String[] strs = line.split("/");

if (strs.length == 3) {

int days = getDays(strs[0], strs[1], strs[2]);

if (days == 0) {

System.out.println(String.format("%s 同學(xué),今天是你的生日,祝你生日快樂(#^.^#)", name, days));

} else {

System.out.println(String.format("%s 同學(xué)離自己最近下一次生日%d天。", name, days));

}

} else {

System.out.println("生日輸入不正確!請按格式輸入。");

}

sc.close();

}

/**

* 獲取最近一次生日天數(shù)

*

* @param year

* @param month

* @param day

* @return

*/

public static int getDays(String year, String month, String day) {

Calendar now = Calendar.getInstance();

now.set(Calendar.HOUR_OF_DAY, 0);

now.set(Calendar.MINUTE, 0);

now.set(Calendar.SECOND, 0);

now.set(Calendar.MILLISECOND, 0);

int now_year = now.get(Calendar.YEAR);

Calendar birthday = Calendar.getInstance();

birthday.set(Calendar.YEAR, now_year);

birthday.set(Calendar.MONTH, Integer.parseInt(month) - 1);

birthday.set(Calendar.DAY_OF_MONTH, Integer.parseInt(day));

birthday.set(Calendar.HOUR_OF_DAY, 0);

birthday.set(Calendar.MINUTE, 0);

birthday.set(Calendar.SECOND, 0);

birthday.set(Calendar.MILLISECOND, 0);

long diff = now.getTimeInMillis() - birthday.getTimeInMillis();

if (diff == 0) {

return 0;

} else if (diff 0) {

long diffDays = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);

return Math.abs((int) diffDays);

} else {

birthday.add(Calendar.YEAR, 1);

long diffMi = birthday.getTimeInMillis() - now.getTimeInMillis();

long diffDays = TimeUnit.DAYS.convert(diffMi, TimeUnit.MILLISECONDS);

return (int) diffDays;

}

}

}

誰會用java寫一下關(guān)于生日快樂的,SOS

public class Birthday{

public static void main(String args[]){

System.out.println("凱旋,生日快樂");

}

}

當(dāng)前標(biāo)題:生日快樂java代碼,生日快樂Java代碼
文章鏈接:http://muchs.cn/article12/hcjidc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、小程序開發(fā)、外貿(mào)建站、品牌網(wǎng)站制作、軟件開發(fā)、網(wǎng)站維護(hù)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司