最全Java语言程序设计与数据结构(基础篇)课后练习题 第二章,java面试大全pdf

最后

面试题文档来啦,内容很多,485页!

由于笔记的内容太多,没办法全部展示出来,下面只截取部分内容展示。

1111道Java工程师必问面试题

MyBatis 27题 + ZooKeeper 25题 + Dubbo 30题:

Elasticsearch 24 题 +Memcached + Redis 40题:

Spring 26 题+ 微服务 27题+ Linux 45题:

Java面试题合集:

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter a value in pounds:”);

double pounds = input.nextDouble();

double kilograms = pounds*0.454;

System.out.println(pounds+" pounds is “+kilograms+” kilograms.");

}

}

2.5

================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the subtotal and a gratuity rate:”);

double t = input.nextDouble();

double g = input.nextDouble();

double extra = t*g/100.0;

double s = extra+t;

System.out.println(“The gratuity is $”+extra+" and total is $“+s+”.");

}

}

2.6

================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter a number between 0 and 1000:”);

int num = input.nextInt();

int d1 = num%10;

num/=10;

int d2 = num%10;

num/=10;

int s = num+d1+d2;

System.out.println(“The sum of the digits is “+s+”.”);

}

}

2.7

================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the number of minutes:”);

int min = input.nextInt();

int days = min/60/24;

int years = days/365;

days %= 365;

System.out.println(min+" minutes is approximately “+years+” years and “+days+” days.");

}

}

2.8

================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the time zone offset to GMT:”);

long offset = input.nextLong();

long totalMilliseconds = System.currentTimeMillis();

totalMilliseconds+=offset6060*1000;

long totalSeconds = totalMilliseconds/1000;

long currentSecond = totalSeconds%60;

long totalMinutes = totalSeconds/60;

long currentMinute = totalMinutes%60;

long totalHours = totalMinutes/60;

long currentHour = totalHours%24;

System.out.println(“Current time is “+currentHour+”:”+currentMinute+“:”+currentSecond+" GMT.");

}

}

2.9

================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter v0, v1, and t:”);

double v0 = input.nextDouble();

double v1 = input.nextDouble();

double t = input.nextDouble();

double a = (v1-v0)/t;

System.out.println(“The average acceleration is “+a+”.”);

}

}

2.10

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the amount of water in kilograms:”);

double m = input.nextDouble();

System.out.print(“Enter the initial temperature:”);

double it = input.nextDouble();

System.out.print(“Enter the final temperature:”);

double ft = input.nextDouble();

double q = m*(ft-it)*4184;

System.out.println(“The energy needed is “+q+”.”);

}

}

2.11

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the number of years:”);

int year = input.nextInt();

double base = 312032486;

int secnum = 365243600;

for(int i=1;i<=year;i++)

base=base+secnum/7.0-secnum/13.0+secnum/45.0;

System.out.println(“The population in “+year+” years is “+base+”.”);

}

}

2.12

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter speed and acceleration:”);

double v = input.nextDouble();

double a = input.nextDouble();

double l = vv/(2a);

System.out.println(“The minimum runway length for this airplane is “+l+”.”);

}

}

2.13

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the monthly saving amount:”);

double m = input.nextDouble();

double sum = 0.0;

for(int i=0;i<6;i++)

sum = (m+sum)*(1+0.00417);

System.out.println(“After the sixth month, the account value is $”+sum+“.”);

}

}

2.14

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter weight in pounds:”);

double pounds = input.nextDouble();

System.out.print(“Enter height in inches:”);

double inches = input.nextDouble();

double bmi = pounds0.4535927/(inchesinches0.02540.0254);

System.out.println(“BMI is “+bmi+”.”);

}

}

2.15

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter x1 and y1:”);

double x1 = input.nextDouble();

double y1 = input.nextDouble();

System.out.print(“Enter x2 and y2:”);

double x2 = input.nextDouble();

double y2 = input.nextDouble();

double d = Math.pow((x2-x1)(x2-x1)+(y2-y1)(y2-y1),0.5);

System.out.println(“The distance between the two points is “+d+”.”);

}

}

2.16

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the length of the side:”);

double s = input.nextDouble();

double a = 3Math.pow(3,0.5)/2s*s;

System.out.println(“The area of the hexagon is “+a+”.”);

}

}

2.17

=================================================================

import java.util.Scanner;

public class dierzhang {

public static void main(String[] args){

Scanner input = new Scanner(System.in);

System.out.print(“Enter the temperature in Fahrenheit:”);

double ta = input.nextDouble();

System.out.print(“Enter the wind speed (>=2) in miles per hour:”);

double v = input.nextDouble();

double twc = 35.74+0.6215ta-35.75Math.pow(v,0.16)+0.4275taMath.pow(v,0.16);

System.out.println("The wind chill is "+twc);

}

}

2.18

=================================================================

public class dierzhang {

public static void main(String[] args){

System.out.println(“a b pow(a,b)”);

总结

谈到面试,其实说白了就是刷题刷题刷题,天天作死的刷。。。。。

为了准备这个“金三银四”的春招,狂刷一个月的题,狂补超多的漏洞知识,像这次美团面试问的算法、数据库、Redis、设计模式等这些题目都是我刷到过的

并且我也将自己刷的题全部整理成了PDF或者Word文档(含详细答案解析)

我的美团offer凉凉了?开发工程师(Java岗)三面结束等通知...

66个Java面试知识点

架构专题(MySQL,Java,Redis,线程,并发,设计模式,Nginx,Linux,框架,微服务等)+大厂面试题详解(百度,阿里,腾讯,华为,迅雷,网易,中兴,北京中软等)

我的美团offer凉凉了?开发工程师(Java岗)三面结束等通知...

算法刷题(PDF)

我的美团offer凉凉了?开发工程师(Java岗)三面结束等通知...

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

pow(a,b)");

总结

谈到面试,其实说白了就是刷题刷题刷题,天天作死的刷。。。。。

为了准备这个“金三银四”的春招,狂刷一个月的题,狂补超多的漏洞知识,像这次美团面试问的算法、数据库、Redis、设计模式等这些题目都是我刷到过的

并且我也将自己刷的题全部整理成了PDF或者Word文档(含详细答案解析)

[外链图片转存中…(img-beLkxICE-1715572408560)]

66个Java面试知识点

架构专题(MySQL,Java,Redis,线程,并发,设计模式,Nginx,Linux,框架,微服务等)+大厂面试题详解(百度,阿里,腾讯,华为,迅雷,网易,中兴,北京中软等)

[外链图片转存中…(img-6nRC0DY1-1715572408560)]

算法刷题(PDF)

[外链图片转存中…(img-ps6nKk1Q-1715572408561)]

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

需要这份系统化的资料的朋友,可以点击这里获取

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值