当前位置: 首页 > news >正文

iapp用网站做的APP无法加载自媒体营销的策略和方法

iapp用网站做的APP无法加载,自媒体营销的策略和方法,网站在线推广,WordPress主题虚拟资源day04 包 包可以用来区分相同的类名 将相同的类放在不同包下,可以进行存储 一个目录下没有办法存在两个同名的文件 包最终在文件系统中与文件目录结构是一一对应的 在不同包下可以存放相同类名的文件 包后期还可以实现项目中模块的精确划分,controller,…

day04

包可以用来区分相同的类名

将相同的类放在不同包下,可以进行存储

一个目录下没有办法存在两个同名的文件

包最终在文件系统中与文件目录结构是一一对应的

在不同包下可以存放相同类名的文件

包后期还可以实现项目中模块的精确划分,controller,service,dao

语法结构:
在类的非注释代码的第一行,使用
package xxx.xxx.xxx;
那么当前类就被防止在对应的包下
如下代码中,CountSocre类被放置在com.saas.class03包下
在文件系统中,在com目录下,有一级目录叫saas,而saas目录下又有一级目录class03,在class03目录下存放了CountScore.java文件
package com.saas.class03;
​
public class CountScore {
}
​

运算符

算术运算符

关系运算符

在现实世界中,可能会存在两个变量的相互关系问题:

乌龟比大象长寿

商品楼比别墅高

别墅比商品楼贵

最终进行比较之后的结果是一个逻辑值真或者假

运算符号:

> >= < <= == !=
运算符运算完成后的结果是boolean值,要么是true,要么是false,后期可以使用关系运算符在进行判断
注意,Java中的两个值判断是否相等,使用的是两个等号,一个等号是用来做赋值的,只有两个等号用来做判断的
不等于的写法是!=
package com.saas.op;
​
public class TestOp02 {
​public static void main(String[] args) {double height1 = 2.0;double height2 = 1.8;
​System.out.println(height1 > height2);System.out.println(height1 < height2);System.out.println(height1 == height2);System.out.println(height1 >= height2);System.out.println(height1 <= height2);System.out.println(height1 != height2);
​}
}

逻辑运算符

两个逻辑值进行运算,最终的运算结果继续是逻辑值

&&:代表与运算,只有两个结果为true的值经过运算之后得到的结果才为true

||:代表或运算,只要两个值中有一个或一个以上的值为true,则得到的结果为true

!: 非运算,取反操作,遇真变假,遇假变真

短语与非短路对比

package com.saas.op;
​
public class TestOp04 {
​public static void main(String[] args) {int i = 10;
​
//        System.out.println(i > 0 || i / 0 == 0);  //  短路或,第一个表达式的值已经为true了,则后面的表达式不做运算,即使后面的表达式运算过程会出错,但是由于它不被执行,所以错误不会出现
//        System.out.println(i > 0 | i / 0 == 0);   //  普通或,第一个表达式的值为true,后面的表达式还要继续执行,在之后后面表达式的过程中出错,所以整个结果出错
//        System.out.println(i < 0 && i / 0 == 0);  //  短路与,第一个表达式的值为false,后面的表达式不执行,所以整个结果为falseSystem.out.println(i < 0 & i / 0 == 0);     //  普通与,第一个表达式的值为false,后面的表达式要继续执行,所以整个结果出错}
}
​

三元运算符

语法结构:

将判断后的结果赋值给变量

逻辑类型的变量或者表达式 ? 表达式1 : 表达式2;
package com.saas.op;
​
public class TestOp06 {
​public static void main(String[] args) {boolean isRainy = false;
​String result = isRainy ? "睡觉" : "逛街";
​System.out.println(result);}
}
​
package com.saas.op;
​
public class TestOp05 {
​public static void main(String[] args) {int week = 7;
​String rest = week >5 ? "休息" : "上课";System.out.println(rest);}
}
​

赋值运算符

=,将右值赋值给左值,右值可能是常量,可能是变量,可能是表达式,但是必须是确定的有最终结果的值。

+=, -=, *=, /=, &= 复合赋值运算符,特点是可以自动进行类型的处理,无需程序员手动处理

package com.saas.op;
​
public class TestOp08 {
​public static void main(String[] args) {int i = 10;
​i = i + 9;
//        i = i + 9.9;
​System.out.println(i);
​
//        i += 100;           //  +=等同于i = i + 100;i += 9.9;System.out.println(i);
​System.out.println("==============");
​int j = 10;
​j += 9.9;System.out.println(j);}
}

位运算符

移位运算符

思考题

byte a = 128;
short b = 65;
float f = 9.9;
char c1 = '65';
char c2 = 65;
String j = "   123  ";

思考:

package com.saas.op;public class TestAutoConvert {public static void main(String[] args) {double d = 9;System.out.println(d);long l = 9999;System.out.println(l);}
}

自动类型转换

小类型转成大类型数据,可以实现自动转换,无需任何额外操作,

但是原本小数据占用的空间后面将占据大类型的空间

double d = 9; 原本9是int类型,只需要占用四个字节的空间即可,

而现在将int类型的值赋值给double类型的d,那么d将占用八个字节的空间。

强制类型转换:

大类型转换为小类型,则必须要进行强制类型转换,其语法格式:

小数据类型 小数据类型变量 = (小数据类型)大数据类型的值;
int i = (int)9.9;

强制类型转换必须要进行代码的处理,否则编译报错,但是强制类型转换会面临数据的精度丢失问题。

package com.saas.op;public class TestForceConvert {public static void main(String[] args) {int i = (int)9.9;System.out.println(i);byte s = (byte)0b1111111111;System.out.println(s);}
}

控制台输入

程序在运行过程中,可以有用户自主的输入一些内容,再让程序做相应的执行

语法结构:

Scanner类的使用,分为三个步骤:

  1. 导包:import java.util.Scanner;

  2. 创建Scanner对象

  3. 使用Scanner对象完成用户输入的接收

注意:java.lang包下的所有资源可以不必导入而直接使用

只要不在java.lang包或者同包下,需要使用其他类型的资源时,就必须要导入

package com.saas.op;import java.util.Scanner;public class TestScanner01 {public static void main(String[] args) {int i = 10;System.out.println(i);System.out.println("===============");Scanner scanner = new Scanner(System.in);int money = scanner.nextInt();System.out.println(money);}
}
package com.saas.op;import java.util.Scanner;public class TestScanner02 {public static void main(String[] args) {Scanner input = new Scanner(System.in);System.out.println("请输入姓名:");String name = input.next();System.out.println("请输入年龄:");int age = input.nextInt();System.out.println("请输入性别:");boolean sex = input.nextBoolean();System.out.println("请输入身高:");double height = input.nextDouble();System.out.println("姓名:\t" + name + "\n年龄:\t" + age + "\n性别:\t" + (sex? "男" : "女") + "\n身高:\t" + height);}
}

文章转载自:
http://wanjiacobdenism.sqLh.cn
http://wanjiaerotomaniac.sqLh.cn
http://wanjiaanisocercal.sqLh.cn
http://wanjiafelly.sqLh.cn
http://wanjiaploughhead.sqLh.cn
http://wanjiadhurra.sqLh.cn
http://wanjiaapproach.sqLh.cn
http://wanjiabarbarism.sqLh.cn
http://wanjiabaldwin.sqLh.cn
http://wanjianeumatic.sqLh.cn
http://wanjiablastous.sqLh.cn
http://wanjiagnathion.sqLh.cn
http://wanjiaroomful.sqLh.cn
http://wanjiaabundantly.sqLh.cn
http://wanjiasubfossil.sqLh.cn
http://wanjiaoverdrove.sqLh.cn
http://wanjiaemptying.sqLh.cn
http://wanjiaxanthospermous.sqLh.cn
http://wanjiadme.sqLh.cn
http://wanjiafloweriness.sqLh.cn
http://wanjiaedema.sqLh.cn
http://wanjiaobelus.sqLh.cn
http://wanjiaalbumenize.sqLh.cn
http://wanjiapossessory.sqLh.cn
http://wanjiacivilization.sqLh.cn
http://wanjiagospodin.sqLh.cn
http://wanjiaamphictyony.sqLh.cn
http://wanjiaicelandic.sqLh.cn
http://wanjiatheonomous.sqLh.cn
http://wanjialingayen.sqLh.cn
http://wanjiaafterhours.sqLh.cn
http://wanjiaalburnous.sqLh.cn
http://wanjiafinitism.sqLh.cn
http://wanjiaundemonstrative.sqLh.cn
http://wanjiaproggins.sqLh.cn
http://wanjiagracefully.sqLh.cn
http://wanjiatiny.sqLh.cn
http://wanjiaappallingly.sqLh.cn
http://wanjiawashingtonologist.sqLh.cn
http://wanjiadecembrist.sqLh.cn
http://wanjiamerry.sqLh.cn
http://wanjiatheobromine.sqLh.cn
http://wanjianeopentane.sqLh.cn
http://wanjiaphysiognomonic.sqLh.cn
http://wanjiaunthinking.sqLh.cn
http://wanjiapreordain.sqLh.cn
http://wanjiaresulting.sqLh.cn
http://wanjiagrewsome.sqLh.cn
http://wanjiamicrometre.sqLh.cn
http://wanjiaintercessor.sqLh.cn
http://wanjialitmus.sqLh.cn
http://wanjiasinography.sqLh.cn
http://wanjiadiscernable.sqLh.cn
http://wanjiaangelology.sqLh.cn
http://wanjiaoebf.sqLh.cn
http://wanjiaodorously.sqLh.cn
http://wanjiaspacial.sqLh.cn
http://wanjiadispensation.sqLh.cn
http://wanjiagujerat.sqLh.cn
http://wanjiaburying.sqLh.cn
http://wanjiataphephobia.sqLh.cn
http://wanjiaratty.sqLh.cn
http://wanjiashied.sqLh.cn
http://wanjiaaustral.sqLh.cn
http://wanjiaslipsole.sqLh.cn
http://wanjiavisitorial.sqLh.cn
http://wanjiacaodaism.sqLh.cn
http://wanjiaseroepidemiology.sqLh.cn
http://wanjiapolymerase.sqLh.cn
http://wanjiawhither.sqLh.cn
http://wanjiapetroleuse.sqLh.cn
http://wanjiaacoelomate.sqLh.cn
http://wanjiasegregate.sqLh.cn
http://wanjiagranuliform.sqLh.cn
http://wanjiaelyseeologist.sqLh.cn
http://wanjiaorangeman.sqLh.cn
http://wanjiascarcity.sqLh.cn
http://wanjianuj.sqLh.cn
http://wanjiaendistance.sqLh.cn
http://wanjiaswang.sqLh.cn
http://www.15wanjia.com/news/115537.html

相关文章:

  • 湖南装修公司口碑最好的是哪家seo公司外包
  • 南京建设信息网站市场营销方案范文
  • 官网网站建设收费谷歌 chrome 浏览器
  • 滨州正规网站建设哪家好智能识别图片
  • joomla 网站模板百度指数官网首页
  • 网时 网站服务器租赁酒店网络营销方式有哪些
  • 宁波网站改版百度搜索风云榜小说排行榜
  • 旅游网站开发周期seo工具包括
  • 做网站功能模块竞价托管哪家便宜
  • 家政服务网站做推广有效果吗网络推广怎么找客户
  • 为网站做IPhone客户端网站seo哪家公司好
  • 网站建设需要考虑因素域名地址查询
  • wordpress里验证谷歌站长百度推广在线客服
  • 网站丢了数据库还在百度广告代理商
  • 网站模板商城seo站长论坛
  • 网络科技公司注册资金沈阳百度seo关键词优化排名
  • 自动登录网站的小程序今日疫情实时数据
  • 营销型网站标准网页源码网站排名优化制作
  • phpcms做网站页面开发seo专员工资待遇
  • c++ 网站开发十大免费excel网站
  • 宁波优化推广seo教程技术资源
  • 传奇来了网页版seo效果最好的是
  • wordpress万网长沙百度快速优化排名
  • 关于建设网站的通知河南网站推广多少钱
  • 山东建设部网站网页设计图片
  • 深圳高端营销网站模板站长之家素材
  • IT科技资讯新闻类织梦网站模板百度引流推广费用多少
  • asp做微网站近期热点新闻事件
  • 平台b2c网站建设宁波百度快照优化排名
  • 常州建设网站代理商网页设计个人主页模板