Description Agenda Advertisement / Annunciations Hosts Guests Historia da Linguagem JDK x JRE X JVM Versões Java SE x Java EE X Jakarta EE X Oracle Especificações LTS - Suporte Coisas novas em cada Versão Guest suggestions Falbo
andrelugomes Updated podcast
package basic.dev; public class MainApp1 { public static void main(String[] args) { /** Khai báo biến */ String firstName = "Dang Ngoc"; String lastName = "Bun"; int old = 15; float markMath = 9f; boolean passed = true; System.out.println("Ho va ten:"); System.out.println(firstName + " " + lastName); System.out.println("Mark Math: " + markMath); System.out.println("Passed: " + passed); //Khai báo hằng. Hằng phải viết hoa final float PI = 3.14f; } }
dangngocbun Updated
如何通过JAVA反射来得到一个runtime exec? 我将我编写的代码写在下面: public class test { public static void main(String[] args) { try { // Process proc =Runtime.getRuntime().exec("exefile"); Class<?> aClass = Class.forName("java.lang.Runtime"); Method getRuntime = aClass.getMethod("getRuntime"); Method exec = aClass.getMethod("exec", String.class); Object invoke = getRuntime.invoke(aClass); exec.invoke(invoke,"calc"); } catch (Exception e){ System.out.println("fak"); } } } 我们如果正常的创建的话只需要Process proc = Runtime.getRuntime().exec("calc")即可。但是反射的话就麻烦许多了,首先我们需要通过三选一的反射方法获取到一个实例 Class.forname() obj.getClass (如果存在某个obj的实例的话可以这样
ysllz Updated
As a new user I can Follow steps to download a sample Android application with Trinsic's SDK added and get it running #220 Follow steps on how to add Trinsic's java SDK to my Maven and/or Gradle toolchain in my project Follow steps to run a demo application that goes through the walkthrough
michaeldboyd Updated
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; import java.util.Scanner; public class DSX extends Vehical { private static Scanner sc = new Scanner(System.in); private int n, k, x; private Vehical ds[] = new Vehical[n]; public int getN() { return n; } public void setN(int n) { this.n = n; } public Vehical[] getDs() { return ds; } public void setDs(Vehical[] ds) { this.ds = ds; } public int getK() { return k; } public void setK(int k) { while(true) { if (k >= 0 && k < getN()) break; else { System.out.printf("Mời nhập lại k với (%d <= 0 < %d: ", 0, n); k = Integer.parseInt(sc.nextLine()); } } this.k = k; } public int getX() { return x; } public void setX(int x) { while(true) { if (x >= 0 && x <= getN()) break; else { System.out.printf("Mời nhập lại x với (%d <= x <= %d): ", 0, n); x = Integer.parseInt(sc.nextLine()); } } this.x = x; } public void them() { System.out.print("Nhập giá trị cần thêm.......\n"); Vehical tmp = new Vehical(); tmp.nhap(); System.out.print("Nhập vị trí x cần thêm: "); setX(Integer.parseInt(sc.nextLine())); ds = Arrays.copyOf(ds, ds.length + 1); if (x == n) { ds[ds.length-1] = new Vehical(); ds[ds.length-1] = tmp; } else { for (int i = ds.length-1; i > x; i--) { ds[i] = ds[i-1]; } ds[x] = tmp; } setN(n+1); } public void sua( ) { if (ds == null) System.out.println("Danh sách rỗng!"); System.out.print("Nhập vị trí cần sửa: "); setK(Integer.parseInt(sc.nextLine())); System.out.print("Nhập giá trị thay thế.......\n"); Vehical tmp = new Vehical(); tmp.nhap(); for (int i = 0; i < n; i++) { ds[i] = tmp; } } public void xoa() { if (ds == null) System.out.println("Danh sách rỗng!"); System.out.print("Nhập vị trí k cần xóa: "); setK(Integer.parseInt(sc.nextLine())); for (int i = k; i < n-1; i++) { ds[i] = ds[i+1]; } if (ds.length >= 0) { ds = Arrays.copyOf(ds, ds.length - 1); setN(n-1); } } public void nhapDS() { System.out.print("Mời nhập số lượng xe: "); setN(Integer.parseInt(sc.nextLine())); Vehical ds[] = new Vehical[n]; setDs(ds); for (int i = 0; i < n; i++) { ds[i] = new Vehical(); ds[i].nhap(); setDs(ds); } } public void xuatDS () { System.out.printf("%-15s %-15s %15s %15s %15s\n", "Tên chủ xe", "Loại xe", "Dung tích", "Trị giá", "Thuế phải nộp"); System.out.printf("===============================================================================\n"); for (int i = 0; i < n; i++) { ds[i].xuat(); } } public void docfile() { System.out.println("Đọc file sẽ chèn dữ liệu vào dữ liệu hiện có!"); System.out.println("Cần nhập ít nhất 1 nhân viên để đọc"); try { FileReader fr= new FileReader("C:\Users\84982\Downloads\test\rf.txt"); BufferedReader br = new BufferedReader(fr); String st; while(true){ st = br.readLine(); if(st==null) break; if(ds[0]!=null) ds=Arrays.copyOf(ds,ds.length+1); String []s = st.split(";"); String tenchu = s[0]; String tenloai = s[1]; int dungtich = Integer.parseInt(s[2]); float trigia = Float.parseFloat(s[3]); float thuenop = Float.parseFloat(s[4]); ds[ds.length-1]=new Vehical(tenchu, tenloai, dungtich, trigia, thuenop); setN(n+1); } } catch (IOException e) { System.out.println("Lỗi!"); } System.out.println("Đọc hoành thành!"); } public void ghifile() { // ghiDS(); try { FileWriter fr=new FileWriter("C:\\Users\\84982\\Downloads\\test\\test.txt"); BufferedWriter fw=new BufferedWriter(fr); fw.write(ds.length+""); fw.newLine(); for (int i = 0; i < n; i++) { String s = ""; fw.write(ds[i].getcXe()); fw.write(";"); fw.write(ds[i].getLoaiXe()); fw.write(";"); s += ds[i].getDungTich(); fw.write(s); fw.write(";"); s = ""; s += ds[i].getPrice(); fw.write(s); fw.write(";"); s = ""; s+= ds[i].getThue(); fw.write(s); fw.write(";"); fw.newLine(); } fw.close(); fr.close(); } catch (IOException ex) { System.out.println("Loi"); } } public void ghifile1() { // ghiDS(); try { FileWriter fr=new FileWriter("C:\\Users\\84982\\Downloads\\test\\test.txt"); BufferedWriter fw=new BufferedWriter(fr); for (int i = 0; i < n; i++) { String s = ""; fw.write(ds[i].getcXe()); fw.write(";"); fw.write(ds[i].getLoaiXe()); fw.write(";"); s += ds[i].getDungTich(); fw.write(s); fw.write(";"); s = ""; s += ds[i].getPrice(); fw.write(s); fw.write(";"); s = ""; s+= ds[i].getThue(); fw.write(s); fw.write(";"); fw.newLine(); } fw.close(); fr.close(); } catch (IOException ex) { System.out.println("Loi"); } } public static void main(String[] args) { DSX xe = new DSX(); //System.out.println("Nhập ds sẽ thêm mới toàn bộ dữ liệu hiện hành!"); xe.nhapDS(); //docfile này là đọc file không có dữ liệu độ dài xe.docfile(); //xe.them(); //xe.xoa(); xe.xuatDS(); //ghifile này là ghifile có độ dài //xe.ghifile(); //ghifile này là ghifile không có độ dài xe.ghifile1(); } }
VanuLL Updated
It should be investigated what is needed to enable Java Modules for this project.
qurben Updated
Hello! I am trying to run the bulk exporter on an environment that has a large set of sub folders and documents. (something about 30GB, but we need export more data on another environment (about 1TB) is posible with that tool ?) here is my export link for env with 30GB http://host:8080/alfresco/service/extensions/bulkexport/export?nodeRef=workspace://SpacesStore/[XXXX]&base=D:/export&ignoreExported=false&exportVersions=true&revisionHead=false&useNodeCache=true&nbOfThreads=8 after some time ( typicaly 3 hours) im getting this exception 2021-11-18 14:14:52,052 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-3] Exception from executeScript: 10180145 Wrapped Exception (with status template): 10181543 Exception in Transaction. org.springframework.extensions.webscripts.WebScriptException: 10180145 Wrapped Exception (with status template): 10181543 Exception in Transaction. at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1139) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171) at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:595) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:362) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.alfresco.web.app.servlet.ServletMetricsFilter.doFilter(ServletMetricsFilter.java:161) at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.alfresco.web.scripts.servlet.X509ServletFilterBase.doFilter(X509ServletFilterBase.java:196) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:201) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698) at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:311) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:568) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1629) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.alfresco.error.AlfrescoRuntimeException: 10181543 Exception in Transaction. at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:536) at org.alfresco.repo.index.shard.ShardRegistryImpl.lambda$registerShardState$6(ShardRegistryImpl.java:297) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:602) at org.alfresco.repo.index.shard.ShardRegistryImpl.registerShardState(ShardRegistryImpl.java:297) at org.alfresco.repo.solr.SOLRTrackingComponentImpl.registerShardState(SOLRTrackingComponentImpl.java:1370) at jdk.internal.reflect.GeneratedMethodAccessor727.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:79) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy121.registerShardState(Unknown Source) at org.alfresco.repo.web.scripts.solr.TransactionsGet.executeImpl(TransactionsGet.java:131) at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64) ... 52 more Caused by: java.lang.OutOfMemoryError: Java heap space Is there any idea what to do with that? Im new in alfresco soo be patient pls :-)) Our version: Windows server 2016 Alfresco Share v6.2.1 (r90b39e43d479b3b3a1fccd89996a6c49e9140edc-b12, Aikau 1.0.101.19, Spring Surf 6.2.1, Spring WebScripts 7.14, Freemarker 2.3.28, Rhino 1.7.11, Yui 2.9.0-alfresco-20141223) Alfresco Enterprise v6.2.1 (rffab6782-b2500) schema 13001 Ive just tried to incerase jvm like in this issue https://hub.alfresco.com/t5/alfresco-content-services-forum/how-to-increase-jvm/td-p/48214/page/2 we have tomcat as windows service, but no properties tab "Java" on file tomcat8.exe :( thank for your reply!
suplik10 Updated
同为PointwiseMutualInformation的成员函数,在 calculatePMI 中使用其它这个类中的函数是,没有必要 new PointwiseMutualInformation public double calculatePMI(double[][] coocurrence, int cIndex, int tIndex) { PointwiseMutualInformation pmi = new PointwiseMutualInformation(); <<<< double N = pmi.getN(coocurrence); double pt = pmi.getPTarget(coocurrence, tIndex, N); double pc = pmi.getPContext(coocurrence, cIndex, N); double jointPct = pmi.getPct(coocurrence, cIndex, tIndex, N); double valuePMI = Math.log(jointPct / (pt * pc)); return valuePMI; } 可以改为下边这样: public double calculatePMI(double[][] coocurrence, int cIndex, int tIndex) { // PointwiseMutualInformation pmi = new PointwiseMutualInformation(); <<<< double N = getN(coocurrence); double pt = getPTarget(coocurrence, tIndex, N); double pc = getPContext(coocurrence, cIndex, N); double jointPct = getPct(coocurrence, cIndex, tIndex, N); double valuePMI = Math.log(jointPct / (pt * pc)); return valuePMI; }
yuhere Updated
CS4013Project-main.zip -- Started work on the reservations.java There's still a few more things to do to make it work: Need to set up the adding the reservations in properly instead of creating it in the class like with "one" and "two" Need to compare the amount of a particular rooms to the reservations.csv to make sure that there is space in the room figure out format of LocalDate checkInDate, LocalDate checkOutDate, to input into the arraylist ^ same with "rooms"
Conorh2354 Updated
你好,我想在这个WFCMessage.java类里面的Message对象里加一个字段,但是没找到WFCMessage.proto文件,如果没这个源文件的话应该怎么添加字段
chibupangdeaxiong Updated
What can cause such an error? Exception in thread "redisson-3-4" java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Set at org.redisson.RedissonMap.readAllEntrySet(zb:513) at org.redisson.spring.session.RedissonSessionRepository$RedissonSession.load(RedissonSessionRepository.java:97) at org.redisson.spring.session.RedissonSessionRepository.findById(RedissonSessionRepository.java:319) at org.redisson.spring.session.RedissonSessionRepository.onMessage(RedissonSessionRepository.java:261) at org.redisson.spring.session.RedissonSessionRepository.onMessage(RedissonSessionRepository.java:53) at org.redisson.d.onPatternMessage(ol:156) at org.redisson.client.RedisPubSubConnection.onMessage(RedisPubSubConnection.java:84) at org.redisson.client.handler.CommandPubSubDecoder.lambda$enqueueMessage$0(CommandPubSubDecoder.java:188) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) [epollEventLoopGroup-2-5] WARN io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor, but class was expected at com.esotericsoftware.reflectasm.ConstructorAccess.insertConstructor(ConstructorAccess.java:128) at com.esotericsoftware.reflectasm.ConstructorAccess.get(ConstructorAccess.java:98) at com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy.newInstantiatorOf(Kryo.java:1271) at com.esotericsoftware.kryo.Kryo.newInstantiator(Kryo.java:1127) at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:1136) at com.esotericsoftware.kryo.serializers.FieldSerializer.create(FieldSerializer.java:562) at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:538) at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) at org.redisson.codec.KryoCodec$1.decode(KryoCodec.java:126) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:402) at org.redisson.client.handler.CommandDecoder.decodeList(CommandDecoder.java:446) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:411) at org.redisson.client.handler.CommandDecoder.decodeCommandBatch(CommandDecoder.java:300) at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:233) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:160) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:129) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:796) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:432) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:333) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)
Eclipse 에서 편집해서 빌드 커스텀 패키지 가능 Example: Extending Mendix Apps with Java
wch18735 Updated
public class SwapTwoNumbers { public static void main(String[] args) { // TODO Auto-generated method stub int x, y, temp; System.out.println("Enter x and y"); Scanner in = new Scanner(System.in); x = in.nextInt(); y = in.nextInt(); System.out.println("Before Swapping" + x + y); temp = x; x = y; y = temp; System.out.println("After Swapping" + x + y); } }
venkateshreddy68 Updated
/* To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. */ package javaapplication9; import javax.swing.JOptionPane; /** * @author Fawaz */ public class JavaApplication9 { /** @param args the command line arguments */ public static void main(String[] args) { /* int array[] = new int[5]; int input = 0; int numberofodd = 0; for (int i = 0; i < array.length; i++) { array[i] = Integer.parseInt(JOptionPane.showInputDialog("Enter numbers")); } for (int i = 0; i < array.length; i++) { if (array[i]%2 != 0) { System.out.println(array[i]); numberofodd++; } } System.out.println("Number of odd is : " + numberofodd); System.out.println("======================="); */ int numberofstudent = Integer.parseInt(JOptionPane.showInputDialog("Enter numbers of student")); int StudentID[] = new int[numberofstudent]; String StudentName[] = new String[numberofstudent]; int StudentGrade[] = new int[numberofstudent]; int method = 0; int speficStudent = 0; int Didfoundstudent = 0; for (int i = 0; i < numberofstudent; i++) { StudentID[i] = Integer.parseInt(JOptionPane.showInputDialog((i+1) + " of " + numberofstudent + " | Enter Student ID")); StudentName[i] = JOptionPane.showInputDialog((i+1) + " of " + numberofstudent + " | Enter Student Name"); StudentGrade[i] = Integer.parseInt(JOptionPane.showInputDialog((i+1) + " of " + numberofstudent + " | Enter Student Grade")); } while (method != 5) { method = Integer.parseInt(JOptionPane.showInputDialog("1.To print all student infomation\n 2.To Print student sussced\n 3.To Print student fail\n 4.To print student by ID\n 5.To stop\n------------\nNoice The total of student is : " + numberofstudent)); switch(method) { case 1: System.out.println("print all student infomation"); for (int i = 0; i < numberofstudent; i++) { System.out.println("ID : " + StudentID[i]); System.out.println("Name : " + StudentName[i]); System.out.println("Grade : " + StudentGrade[i]); System.out.println("----------------"); } System.out.println("======================================="); break; case 2: System.out.println(" Print student sussced"); for (int i = 0; i < numberofstudent; i++) { if(StudentGrade[i] >= 60){ System.out.println("ID : " + StudentID[i]); System.out.println("Name : " + StudentName[i]); System.out.println("Grade : " + StudentGrade[i]); System.out.println("----------------"); } } System.out.println("======================================="); break; case 3: System.out.println("Print student fail"); for (int i = 0; i < numberofstudent; i++) { if(StudentGrade[i] < 60){ System.out.println("ID : " + StudentID[i]); System.out.println("Name : " + StudentName[i]); System.out.println("Grade : " + StudentGrade[i]); System.out.println("----------------"); } } System.out.println("======================================="); break; case 4: System.out.println("print student by ID"); speficStudent = Integer.parseInt(JOptionPane.showInputDialog("Enter student id")); for (int i = 0; i < numberofstudent; i++) { if(StudentID[i] == speficStudent){ System.out.println("ID : " + StudentID[i]); System.out.println("Name : " + StudentName[i]); System.out.println("Grade : " + StudentGrade[i]); System.out.println("----------------"); Didfoundstudent = 1; } } System.out.println("======================================="); break; default: JOptionPane.showMessageDialog(null,"Thank you for using out program"); } } }}
F-ER Updated
ensure proper selection of the Java compile target version and using the proper Java version when running the gradle scripts. ATM there is some juggling in the terminal required to get things running. Also the error markers from the other issue are most likely due to Java version selection.
Dierk Updated
Hi, im trying tu run java project, but it sends me an exception. Exception in thread "main" com.mongodb.MongoClientException: Unrecognized KMS provider key: gcp at com.mongodb.internal.capi.MongoCryptHelper.createMongoCryptOptions(MongoCryptHelper.java:58) at com.mongodb.client.internal.Crypts.create(Crypts.java:46) at com.mongodb.client.internal.ClientEncryptionImpl.(ClientEncryptionImpl.java:40) at com.mongodb.client.vault.ClientEncryptions.create(ClientEncryptions.java:36) at com.mongodb.csfle.util.CSFLEHelpers.createKeyVault(CSFLEHelpers.java:230) at com.mongodb.csfle.util.CSFLEHelpers.createDataEncryptionKey(CSFLEHelpers.java:198) at com.mongodb.csfle.DataEncryptionKeyCreator.main(DataEncryptionKeyCreator.java:82) I have the last version of moncrypt and mongo driver.
juanvargas123 Updated
Reflection in Java Reflection is a runtime API for inspecting and changing the behavior of methods, classes, and interfaces. https://www.educative.io/edpresso/what-is-java-reflection 왜 쓰는지는 정확히 모르겠다... run time에 metadata를 얻고, 분석하고, modify하기 위해서라는데 .. 자세한 내용은 java.lang.Class & java.lang.reflect 에서 참고할 수 있다고 한다.
namnani Updated
Previous Next