Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
0 Endorsements
Ranked #3K
~32.0K People Reached
Favorite Forums

16 Posted Topics

Member Avatar for baneyramos_09

The problem is that, you haveused the if statement , you have mentioned the return statement when tour if statement is satisfied but what will the program return when if condition is false. So, use the else statement with proper return in it.

Member Avatar for stultuske
0
265
Member Avatar for xterradaniel

Solution of you proble is: [code] import java.io.*; public class file { public static void main(String ar[]) { int x=0; try { File file=new File("abc1276.txt"); FileWriter filewriter=new FileWriter(file); BufferedWriter writer=new BufferedWriter(filewriter); for(int i=0;i<10;i++) { x=(int)(Math.random()*10+10); writer.write(" "+x); } writer.close(); } catch(IOException e) { e.printStackTrace(); } try { File file1=new File("abc1276.txt"); …

Member Avatar for nate.nelson.566
0
3K
Member Avatar for Dupron

Please suggest a good book for learning [B]struts[/B]. I am a beginner with struts, So kindly suggest book keeping this thing in mind. Till now I have heard about [CODE]Struts 2 in action[/CODE]. Any information about this book is very helpful. Kindly reply as soon as possible.

0
77
Member Avatar for Xufyan

You program is not working because you/your teacher have used the wrong syntax for declaring the byte array. It should be like this [code] byte[] b = new byte[255]; [/code] it means declare an array object b of type byte and it can store 255 variables of type byte.

Member Avatar for JamesCherrill
0
168
Member Avatar for diggerman

You can use loops to put values into arrays like this [code] for(int i=0;i<10;i++) { salary[i]=sc.nextInt(); } [/code]

Member Avatar for diggerman
0
13K
Member Avatar for juice33

While compiling your so called java file you must save it with name of the class in your case it is gradeBookDriver and after seeing your screenshot I found that you are using filename different from the name of your class The actual name of your class is gradeBookDriver and …

Member Avatar for JamesCherrill
0
107
Member Avatar for sciprog1
Member Avatar for moustafa taha

You can solve your problem using the format method and restrict your decimal places upto which digit you want. For eg: To restrict to 3 digits use [code] String s=String.format("%.3f",4765.098000); System.out.println(s); [/code] It will give output 4765.098 i.e upto 3 decimal places.

Member Avatar for Dupron
0
140
Member Avatar for kazumahits

Check this code. Hope this will solve your problem.. [code] import java.io.*; public class ifelse { public static void main(String[] args) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String a; System.out.println("Enter your Level"); a = in.readLine(); if (a.equals("1")) System.out.println("\nYou are Freshman"); else if (a.equals("2")) System.out.println("\nYou are Sophomore"); else if …

Member Avatar for jon.kiparsky
0
11K
Member Avatar for alex1986

You have done a small mistake that you have written imcoming in place of incoming. So, you must first correct this...

Member Avatar for alex1986
0
183
Member Avatar for fat0ali0ma
Member Avatar for fat0ali0ma
0
182
Member Avatar for Dupron

Recently I have made a simple chatting application(in Java). It has two classes one for client and one for server.On compiling it is not giving any error but on running, it is not giving desired result. So, It will be grateful if you come ahead and try out helping me …

Member Avatar for yasuodancez
0
575
Member Avatar for extemer
Member Avatar for gupneha

I am giving you a code for adding record to a database of student. You can take help from this of how to add record to database and modify it as per your requirement. [code] package com; import java.sql.*; public class Enterdb { public int enter(String fname,String eno,String un,String pw,String …

Member Avatar for Dupron
0
198
Member Avatar for rich345

Got the solution of your problem... Check this code: [code] import java.io.*; import java.util.Scanner; public class Scan { public static void main(String[] args) throws IOException{ int value; System.out.println("Enter any number"); Scanner scan= new Scanner(System.in); value=scan.nextInt(); switch(value){ case 1:System.out.println("One"); break; default:System.out.println("Enter another one"); } } } [/code]

Member Avatar for Dupron
0
3K
Member Avatar for BboyRodimus

Recently I have made a simple chatting application(in Java). It has two classes one for client and one for server.On compiling it is not giving any error but on running, it is not giving desired result. So, It will be grateful if you come ahead and try out helping me …

Member Avatar for NormR1
0
282

The End.