import java.util.*;
import java.lang.String;
public class CheckingSubstring2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Please...
Type: Posts; User: m2msucks
import java.util.*;
import java.lang.String;
public class CheckingSubstring2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Please...
Oh I see. I guess my code isn't working correctly. I also found out I need to put a test to make sure string2 is longer than string1. Thanks.
@Junky Thanks. I modified my code and it seems like it's working. I've tried using several different strings and they all seem to work. For some reason, I think there might still be something wrong...
The following topic has been cross posted here.
Write a method that checks whether a string is a substring of another string. Write a test program that prompts the user to enter two strings, and...
I didn't know that before. Thanks.
This topic has just been cross posted here.
I got the code to work now.
Here's a more updated version of my code:
import java.util.*;
import java.lang.String;
import java.lang.Character;
public class CheckingPassword {
public static void main(String[] args) {...
Thanks, I fixed up those parts of my code.
Here is the updated code:
import java.util.*;
import java.lang.String;
import java.lang.Character;
public class CheckingPassword {
public...
Some Websites impose certain rules for passwords. Write a method that checks whether a string is a valid password. Suppose the password rule is as follows:
A password must have at least 8...
Thanks. I already emailed the program to my professor so it's to late to make that change now.
@Norm I didn't realize that. Thanks.
@Squiffy Thanks. I made those changes to my code and got the right output.
Here's the final code:
import java.util.Date;
import java.util.ArrayList;
...
Instead of showing "[]", the last line should display an array that shows all the transactions.
I made the changes to my code however I'm still getting the same output as before. I'm not sure why.
Here's my revised code.
import java.util.Date;
import java.util.ArrayList;
public class...
This problem wants me to use an account class from another problem and add stuff to it.
Design a new Account class as follows:
Add a new data field name of the String type to store the name...
Ok I understand.
Nevermind I got it.
Here's the finished code:
import java.util.Date;
public class AccountProblem {
public static void main(String[] args) {
//create an instance object of class Stock...
@mccolem I just read the whole thing and I still have no idea what to type.
@copeg Why was ravindu's post edited? I want to know what it said.
Yes I did. I'm guessing you are doWhile over on that forum. I fixed up my code and got it to compile.
Here is the revised code:
import java.util.Date;
public class AccountProblem {
public...
"You attempt to access a constructor in the Account class with 3 parameters - there is no constructor of that definition."
I'm trying to access this constructor:
//constructor with specific id...
Here is my attempt:
import java.util.Date;
public class AccountProblem {
public static void main(String[] args) {
//create an instance object of class Stock
Account myAccount =...
Thanks, I fixed up that part of the code. I am able to get numbers to show up after "The distinct numbers are:". However they are not correct. I think there may be something wrong with my...
Write a method to eliminate the duplicate values in the array using the following method header:
public static int[] eliminateDuplicate(int[] numbers)
Write a test program that reads in ten...
Ok thanks. I managed to fix my code and get the right output. Here it is.
public class UsingLoops {
public static void main(String[] args) {
for (int line = 1; line <= 5; line++) {
...
Display the following: Using loops
1
21
321
4321
54321
This is my attempt.